pr_auc_score

pr_auc_score(y_true: ndarray, y_score: ndarray) float[source]

Compute the precision-recall AUC score.

Parameters:
y_truenp.ndarray

True binary labels of shape (n_instances,).

y_scorenp.ndarray

Anomaly scores for each point of the time series of shape (n_instances,).

Returns:
float

Precision-recall AUC score.

See also

sklearn.metrics.precision_recall_curve

Function used under the hood.