plotconfusion
plotconfusion(act,pred,pos,thr) plots a 2-by-2 table that reports the number of false positives, false negatives, true positives, and true negatives in a confusion matrix.
Vector of predictions
act = {'a';'b';'b';'a';'b';'a';'b';'a';'b'}% actual classes
pred = {'a';'a';'b';'b';'b';'b';'b';'a';'b'}% predicted classes
plotconfusion(act,pred,'a')
Vector of probabilities and vector of thresholds
act = [1;1;1;0;0;1;0;1;0] pred = [0.1;0.4;0.3;0.9;0.1;0.5;0.3;0.6;0.8] plotconfusion(act,pred,[],(1:-0.1:0))