IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
calc_sens_spec.m File Reference

Detailed Description

Calculates sensitivities and specificities for each class (row of cc)

*  sens(i) = cc(i, i)/sum(cc(i, :))
*  spec(i) = sum_{j, j ~= i} c(j, j) / sum_{j, j ~= i} sum(cc(j, :))
* 

Definition in file calc_sens_spec.m.

Go to the source code of this file.

Functions

function calc_sens_spec (in cc, in flag_mean)
 

Function Documentation

function calc_sens_spec ( in  cc,
in  flag_mean 
)
Parameters
ccconfusion matrix either in HITS, not percentage
flag_meanif true, the average of all sensitivities and specificities will be returned (this is useful because the cases when sensitivity or specificity is not defined (like rows or columns of cc containing all zeros) are discounted
Returns
a no_classes X 2 matrix. First column are the sensitivities; second column are the specificities