Confusion matrix for classification algorithms.
cm = svmconfmat(g, ghat)
known group labels
predicted group labels
confusion matrix determined by the known group labels g and the predicted group labels ghat
The confusion matrix CM(I,J) represents the count of instances whose known group labels are group J and whose predicted group labels are group I.
[label,instance]=libsvmread("demos/heart_scale"); cc = svmtrain(label,instance); [predicted_label]=svmpredict(label,instance,cc); cm = svmconfmat(label, predicted_label);