>>> from sklearn.metrics import accuracy_score
>>> y_pred = [0, 2, 1, 3]
>>> y_true = [0, 1, 2, 3]
>>> accuracy_score(y_true, y_pred)
0.5
>>> accuracy_score(y_true, y_pred, normalize=False)
2
from sklearn.metrics import confusion_matrix
y_true = [2, 0, 2, 2, 0, 1]
y_pred = [0, 0, 2, 2, 0, 2]
matrix = confusion_matrix(y_true, y_pred)
matrix.diagonal()/matrix.sum(axis=1)
from sklearn.metrics import accuracy_score
accuracy = accuracy_score('''prediction''', '''lebels_test''' )
from sklearn.metrics import accuracy_score
// syntax:
// - sklearn.metrics.accuracy_score(y_true, y_pred, *, normalize=True, sample_weight=None)