sklearn.metrics.plot 您所在的位置:网站首页 sklearnmetricsrecall sklearn.metrics.plot

sklearn.metrics.plot

2023-03-03 03:09| 来源: 网络整理| 查看: 265

DEPRECATED: Function plot_precision_recall_curve is deprecated in 1.0 and will be removed in 1.2. Use one of the class methods: PrecisionRecallDisplay.from_predictions or PrecisionRecallDisplay.from_estimator.

Plot Precision Recall Curve for binary classifiers.

Extra keyword arguments will be passed to matplotlib’s plot.

Read more in the User Guide.

Deprecated since version 1.0: plot_precision_recall_curve is deprecated in 1.0 and will be removed in 1.2. Use one of the following class methods: from_predictions or from_estimator.

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,)

Binary target values.

sample_weightarray-like of shape (n_samples,), default=None

Sample weights.

response_method{‘predict_proba’, ‘decision_function’, ‘auto’}, default=’auto’

Specifies whether to use predict_proba or decision_function as the target response. If set to ‘auto’, predict_proba is tried first and if it does not exist decision_function is tried next.

namestr, default=None

Name for labeling curve. If None, the name of the estimator is used.

axmatplotlib axes, default=None

Axes object to plot on. If None, a new figure and axes is created.

pos_labelstr or int, default=None

The class considered as the positive class when computing the precision and recall metrics. By default, estimators.classes_[1] is considered as the positive class.

New in version 0.24.

**kwargsdict

Keyword arguments to be passed to matplotlib’s plot.

Returns displayPrecisionRecallDisplay

Object that stores computed values.

See also

precision_recall_curve

Compute precision-recall pairs for different probability thresholds.

PrecisionRecallDisplay

Precision Recall visualization.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有