Effacer les filtres
Effacer les filtres

Confusion Matrix Results Sensitivity

12 vues (au cours des 30 derniers jours)
Gledson Melotti
Gledson Melotti le 7 Déc 2017
Commenté : Gledson Melotti le 15 Mar 2018
How do I calculate the sensitivity and specificity with the confusionmat command? What is the position of TP, FP, FN, TN in the confusion matrix provided by matlab? I use the "confusionmat".

Réponse acceptée

YT
YT le 14 Déc 2017
Modifié(e) : YT le 14 Déc 2017
Just use the following.
[cm, order] = confusionmat(real_values,predicted_values)
Assuming your confusionmatrix is 2x2, it will look like this:
%CONFUSIONMAT OUTPUT
%%%%%%%%%%%%%%%%%%%%%%
% predicted
% | 0 1
% r -----------
% e 0 | TN FP
% a 1 | FN TP
% l
%%%%%%%%%%%%%%%%%%%%%%
*EDIT
confusionmat() does not calculate sensitivity, accuracy, F-score and those kind of derivations for you, you need to do them yourself. Just check this out, it's pretty easy.
  2 commentaires
Gledson Melotti
Gledson Melotti le 14 Déc 2017
Thanks a lot for the help.
Gledson Melotti
Gledson Melotti le 15 Mar 2018
Matlab does not calculate the measures (Fscore, TNR, TPR). So why does it provide the following command: accuracy = mean (diag (confMat))?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by