zero_one_loss¶
- probly.metrics.zero_one_loss(y_prob: object, y_true: object) object[source]¶
Compute the mean zero-one loss of the predictions, the average of
zero_one_loss_per_instance().With integer labels this is the error rate,
1 - accuracy.- Parameters:
y_prob – Predicted class probabilities of shape
(..., K), or a categorical distribution.y_true – Integer class labels of shape
(...), or target probabilities of shape(..., K).
- Returns:
The mean zero-one loss in
[0, 1].- Raises:
ValueError – If
y_truehas neither shape or its labels are not integers.TypeError – If
y_probis a sample of predictions.