confusionmatStats(g​roup,grouphat)

This function evaluates the common performance measures for classification models.
4,6K descargas
Actualizado 12 oct 2015

Ver licencia

function stats = confusionmatStats(group,grouphat)
% INPUT
% group = true class labels
% grouphat = predicted class labels
%
% OR INPUT
% stats = confusionmatStats(group);
% group = confusion matrix from matlab function (confusionmat)
%
% OUTPUT
% stats is a structure array
% stats.confusionMat
% Predicted Classes
% p' n'
% ___|_____|_____|
% Actual p | | |
% Classes n | | |
%
% stats.accuracy = (TP + TN)/(TP + FP + FN + TN) ; the average accuracy is returned
% stats.precision = TP / (TP + FP) % for each class label
% stats.sensitivity = TP / (TP + FN) % for each class label
% stats.specificity = TN / (FP + TN) % for each class label
% stats.recall = sensitivity % for each class label
% stats.F-score = 2*TP /(2*TP + FP + FN) % for each class label
%
% TP: true positive, TN: true negative,
% FP: false positive, FN: false negative
%

Citar como

Audrey Cheong (2024). confusionmatStats(group,grouphat) (https://www.mathworks.com/matlabcentral/fileexchange/46035-confusionmatstats-group-grouphat), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2013a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.3.0.0

Accuracy formula corrected. Added group/class label order.
Bug fix (F-score to Fscore)

1.2.0.0

function title

1.1.0.0

Added two comments

1.0.0.0