IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
normalize_rows.m
Go to the documentation of this file.
1 %>@ingroup maths
2 %>@file
3 %>@brief Divides each row of cc by its sum, or leaves it untouched if its sum is zero.
4 %>
5 %> Used to normalize a hits confusion matrix into a percentage confusion matrix.
6 %>
7 %> Please note that it does not work well with negative numbers.
8 %>
10 %
11 %> @param cc
12 %> @return matrix of same size as input
13 function cc = normalize_rows(cc)
14 cc = bsxfun(@rdivide, cc, sum(cc, 2)+realmin);
Linear and Quadratic discriminant.
Definition: clssr_d.m:9
Least-squares classifier.
Definition: clssr_ls.m:5
Class representing a Confusion matrix.
Definition: irconfusion.m:5
Analysis Session (AS) base class.
Definition: as.m:6
function normalize_rows(in cc)