Confusion Matrix Results Sensitivity
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Gledson Melotti
am 7 Dez. 2017
Kommentiert: Gledson Melotti
am 15 Mär. 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".
0 Kommentare
Akzeptierte Antwort
YT
am 14 Dez. 2017
Bearbeitet: YT
am 14 Dez. 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Statistics and Machine Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!