confusion matrix in matlab

2 views (last 30 days)
vinayakumar r
vinayakumar r on 8 Sep 2016
Edited: Thorsten on 8 Sep 2016
I am new to matlab. it is not a binary classification matrix, it is a multi class classification. I have a matrix which is of n*1 yrue label and n*1 predicated label. From this i want to count number of true poitive, true negative, false poitive and false negative, accuracy, precision, recall, f1-score, true positive rate, false positive rate, mean squared error, mean absolute error, auc (area under curve). How to do this? Anybosy haveing code to calculate all this performance measures

Answers (1)

Thorsten
Thorsten on 8 Sep 2016
Edited: Thorsten on 8 Sep 2016
The ROC framework is for binary classification tasks. And you need a continuous valued output of the classifier, corresponding to the strength of the prediction that this instance belong "true". You cannot use this framework here.
To understand this, consider the case
true label prediction
2 3
It's an error, but of what kind? From the view of the 2-class, it's a false-negative. But from the view of the 3-class it is a false-positive. You cannot decide for multiple classes.

Categories

Find more on Statistics and Machine Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!