sklearn.metrics
.RocCurveDisplay¶
-
class
sklearn.metrics.
RocCurveDisplay
(fpr, tpr, roc_auc, estimator_name)[source]¶ ROC Curve visualization.
It is recommend to use
plot_roc_curve
to create a visualizer. All parameters are stored as attributes.Read more in the User Guide.
- Parameters
- fprndarray
False positive rate.
- tprndarray
True positive rate.
- roc_aucfloat
Area under ROC curve.
- estimator_namestr
Name of estimator.
- Attributes
- line_matplotlib Artist
ROC Curve.
- ax_matplotlib Axes
Axes with ROC Curve.
- figure_matplotlib Figure
Figure containing the curve.
Methods
plot
(self[, ax, name])Plot visualization
-
__init__
(self, fpr, tpr, roc_auc, estimator_name)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
plot
(self, ax=None, name=None, **kwargs)[source]¶ Plot visualization
Extra keyword arguments will be passed to matplotlib’s
plot
.- Parameters
- axmatplotlib axes, default=None
Axes object to plot on. If
None
, a new figure and axes is created.- namestr, default=None
Name of ROC Curve for labeling. If
None
, use the name of the estimator.
- Returns
- display
RocCurveDisplay
Object that stores computed values.
- display