Filter löschen
Filter löschen

Find out seperate results from Confusionmat

2 Ansichten (letzte 30 Tage)
dennis vella
dennis vella am 1 Apr. 2013
Bearbeitet: Gledson Melotti am 7 Dez. 2017
I have the below code and answers
[C,order] = confusionmat(exPostDS.Passed_1,predDS.PredRating)
C =
638 62
151 149
order =
'1'
'2'
I would like to know if I can get to know what the values 62 and 151 hold in terms of separate rows. All values are clients which I would like to know at least the ClientID.
Is it possible to be done?

Akzeptierte Antwort

Tom Lane
Tom Lane am 1 Apr. 2013
If I run this code:
load fisheriris
x = meas;
y = species;
yhat = classify(x,x,y);
[cm,order] = confusionmat(y,yhat);
the confusion matrix cm indicates a count of 2 in the [2,3] entry. Here's how I can locate those two rows:
find(strcmp(y,order{2}) & strcmp(yhat,order{3}))
Here my variables y and yhat are cell arrays of strings. You may have to adjust this if your inputs to confusionmat are different data types.
  1 Kommentar
Gledson Melotti
Gledson Melotti am 7 Dez. 2017
Bearbeitet: Gledson Melotti am 7 Dez. 2017
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 "confusionmat".

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by