MATLAB File Help: prtScoreConfusionMatrix
prtScoreConfusionMatrix
 [confMat,occurances] = prtScoreConfusionMatrix(guess,truth)
  prtScoreConfusionMatrix Plot or return the confusion matrix
 
    CONFMAT = prtScoreConfusionMatrix(GUESS, TRUTH) returns the confusion matrix that
    results from comparing  GUESS as compared to the truth in TRUTH.
    GUESS and TRUTH should both be Nx1 vectors. The elements of both TRUTH
    and GUESS should be binary or interger class labels.
 
    prtScoreConfustionMatrix(GUESS,TRUTH) called without any output
    arguments plots the confusion matrix.
 
     Example:     
     TestDataSet = prtDataGenMary;        % Create some test and
     TrainingDataSet = prtDataGenMary;   % training data
     classifier = prtClassMap;             % Create a classifier
     classifier.internalDecider = prtDecisionMap;
     classifier = classifier.train(TrainingDataSet);    % Train
     classified = run(classifier, TestDataSet);     
     %  Display the confusion matrix
     prtScoreConfusionMatrix(classified, TestDataSet)
See also