Confusion matrix for classification algorithms.
cm = libsvm_confmat(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(fullfile(libsvm_getpath(),"demos","heart_scale")); cc = libsvm_svmtrain(label,instance); [predicted_label]=libsvm_svmpredict(label,instance,cc); cm = libsvm_confmat(label, predicted_label) | ![]() | ![]() |