accuracy¶
- probly.metrics.accuracy = <flextype.singledispatch.Flexdispatch object>¶
Compute top-1 classification accuracy.
- Parameters:
y_pred – Predicted class labels of shape
(n,), class probabilities of shape(n, k), or a categorical distribution; probabilities and distributions are reduced to labels via argmax.y_true – Integer ground-truth class labels of shape
(n,).
- Returns:
The fraction of correct predictions in
[0, 1].- Raises:
NotImplementedError – If no implementation is registered for the type of
y_pred.TypeError – If
y_predis a sample of predictions.