Created
January 2, 2016 18:01
-
-
Save limzunyuan/15f27ead4e4c99b9fc7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ rate ] = avg_classification_rate( matrix ) | |
%AVG_CLASSFICATION_RATE Calculates average classification rate | |
% CR is no. of correctly classified examples (trace) divided by | |
% total no. of examples (sum of matrix) | |
total = sum(sum(matrix)); | |
correct = trace(matrix); | |
rate = correct / total; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment