How to calculate confusion matrix , accuracy and precision
398 views (last 30 days)
I have two logical tables 100 x 100 for each that contain 0 & 1 values . one table for original values and other table is for predicted values
i want to know how can i make confusion matrix and calculate accuracy and precision for predicted values in comparision to original values
Here the tables:-
Srivardhan Gadila on 17 Dec 2020
You can refer to the following functions available in MATLAB to compute confusion matrix: Functions for computing "confusion matrix".
accuracy = sum(OrigValues == PredValues,'all')/numel(PredValues)
Make sure that the above computations are performed properly w.r.t the number of samples dimension and necessary changes are to be made based on it (i.e., Dimension of number of samples can be number of rows or number of columns or the number of tables itself in your case as it is not mentioned anywhere in the question).