Clear Filters
Clear Filters

How to calculate sensitivity, specificity, F-score from confusion matrix ?

27 views (last 30 days)
  1 Comment
Mick
Mick on 16 Jun 2023
This might help (https://www.mathworks.com/matlabcentral/fileexchange/60900-multi-class-confusion-matrix)

Sign in to comment.

Answers (1)

Ishit
Ishit on 18 Jun 2023
Hi Fatin, Please use this code as reference.
disp('_____________Multiclass demo_______________')
disp('Runing Multiclass confusionmat')
n=100;m=2;
actual=round(rand(1,n)*m);
predict=round(rand(1,n)*m);
[c_matrix,Result,RefereceResult]= confusion.getMatrix(actual,predict);
Output for the file can be seen in in this link output.

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!