-1
$\begingroup$
Assume you are solving a 4-class problem. Your test set is as follows: 
•   5 samples from class 1, 
•   10 samples from class 2, 
•   5 samples from class 3,
•   10 samples from class 4. 
•   Total Samples: 30
The decision made by your classifier is as follows:
•   2 samples from class 1 are decided as class 1, 3 samples from class 1 are decided as class 2.
•   2 samples from class 2 are decided as class 1, 5 samples from class 2 are decided as class 2, 1 sample from class 2 are decided as class 3, and 2 samples from class 2 is decided as class 4.
•   4 samples from class 3 are decided as class 3 and 1 sample from class 3 is decided as class 4.
•   2 samples from class 4 are decided as class 1, and 8 samples from class 4 are decided as class 4.
Generate a confusion matrix. Using the confusion matrix, calculate accuracy, average precision, and average recall rate.

I need help calculating the accuracy recall rate and precision by hand using this confusion matrix below

enter image description here

$\endgroup$
0
$\begingroup$

Accuracy: The sum of the numbers on the diagonal divided by the sum of all numbers on the grid

Recall and Precision depend on if you want to take the micro or macro approach. See this blog post for more details (it gives a very similar example to your case): https://towardsdatascience.com/confusion-matrix-for-your-multi-class-machine-learning-model-ff9aa3bf7826

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.