Open
Description
Describe the workflow you want to enable
Working with binary classifiers I often, in addition to PR-curve and ROC-curve, need Precision / Recall / F1 (y-axis) for probability thresholds (x-axis).
Describe your proposed solution
import numpy as np
from sklearn.metrics import precision_recall_curve, PrecisionRecallF1Display
y_true = np.array([0, 0, 1, 1])
y_scores = np.array([0.1, 0.4, 0.35, 0.8])
precision, recall, thresholds = precision_recall_curve(y_true, y_scores)
display = PrecisionRecallF1Display(precision, recall, thresholds, plot_f1=True)
display.plot()
Describe alternatives you've considered, if relevant
No response
Additional context
No response
Metadata
Metadata
Assignees
Type
Projects
Status
Discussion