FUNCTION REFERENCE

confusion

Classification confusion value, counts, sample indices and class rates.

Classification confusion value, counts, sample indices and class rates.

Syntax

[c,cm,ind,per] = confusion(targets,outputs)

Targets are S-by-Q one-hot columns; outputs in [0,1] select the first maximum. A binary row uses outputs >= 0.5. Counts and index cells have target rows and output columns. per columns are FN/output-negatives, FP/output-positives, TP/output-positives and TN/output-negatives; zero denominators give NaN.

Example

[c,cm,ind,per] = confusion([0 1 1],[.1 .9 .2]);

Differences from MATLAB: finite matrices only; at most 256 classes.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.