Compute the following Machine Learning metrics by showing your working:
Accuracy
Precision
Recall
F1-Measure
Accuracy classification score:
sklearn.metrics.accuracy_score: function computes subset accuracy: the set of labels predicted for a sample must exactly match the corresponding set of labels in y_true.
Example (Python):
>>> 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
Comments
Leave a comment