필터 지우기
필터 지우기

Confusion Matrix Results Sensitivity

조회 수: 12 (최근 30일)
Gledson Melotti
Gledson Melotti 2017년 12월 7일
댓글: Gledson Melotti 2018년 3월 15일
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".

채택된 답변

YT
YT 2017년 12월 14일
편집: YT 2017년 12월 14일
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
Gledson Melotti
Gledson Melotti 2017년 12월 14일
Thanks a lot for the help.
Gledson Melotti
Gledson Melotti 2018년 3월 15일
Matlab does not calculate the measures (Fscore, TNR, TPR). So why does it provide the following command: accuracy = mean (diag (confMat))?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by