It is recommended to use from_estimator
or from_predictions to create a
visualizer. All parameters are stored as attributes.
For general information regarding scikit-learn visualization tools, see
the Visualization Guide.
For guidance on interpreting these plots, refer to the
Model Evaluation Guide.
Added in version 0.24.
Parameters:
fprndarray
False positive rate.
fnrndarray
False negative rate.
estimator_namestr, default=None
Name of estimator. If None, the estimator name is not shown.
For general information regarding scikit-learn visualization tools, see
the Visualization Guide.
For guidance on interpreting these plots, refer to the
Model Evaluation Guide.
Added in version 1.0.
Parameters:
estimatorestimator instance
Fitted classifier or a fitted Pipeline
in which the last estimator is a classifier.
X{array-like, sparse matrix} of shape (n_samples, n_features)
Input values.
yarray-like of shape (n_samples,)
Target values.
sample_weightarray-like of shape (n_samples,), default=None
Sample weights.
drop_intermediatebool, default=True
Whether to drop thresholds where true positives (tp) do not change
from the previous or subsequent threshold. All points with the same
tp value have the same fnr and thus same y coordinate.
Plot the DET curve given the true and predicted labels.
For general information regarding scikit-learn visualization tools, see
the Visualization Guide.
For guidance on interpreting these plots, refer to the
Model Evaluation Guide.
Added in version 1.0.
Parameters:
y_truearray-like of shape (n_samples,)
True labels.
y_predarray-like of shape (n_samples,)
Target scores, can either be probability estimates of the positive
class, confidence values, or non-thresholded measure of decisions
(as returned by decision_function on some classifiers).
sample_weightarray-like of shape (n_samples,), default=None
Sample weights.
drop_intermediatebool, default=True
Whether to drop thresholds where true positives (tp) do not change
from the previous or subsequent threshold. All points with the same
tp value have the same fnr and thus same y coordinate.
Added in version 1.7.
pos_labelint, float, bool or str, default=None
The label of the positive class. When pos_label=None, if y_true
is in {-1, 1} or {0, 1}, pos_label is set to 1, otherwise an
error will be raised.
namestr, default=None
Name of DET curve for labeling. If None, name will be set to
"Classifier".
axmatplotlib axes, default=None
Axes object to plot on. If None, a new figure and axes is
created.
**kwargsdict
Additional keywords arguments passed to matplotlib plot function.