I got
predicted = [0, 0, 1, 0, 1, 2, 1, 0, 1, 0]
actual = [1, 2, 1, 2, 0, 1, 0, 2, 1, 1]
from multiclass classifier
Next, I calculate for 3 classes
tp = [0, 2, 0]
fp = [5, 2, 1]
tn = [3, 3, 6]
fn = [2, 3, 3]
The real accuracy is 0.2, but I got 14/30 using formula
accuracy = (tp+tn)/(tp+fp+tn+fn)
How to calculate accuracy correctly?