TabularPredictor.evaluate_predictions¶
- TabularPredictor.evaluate_predictions(y_true, y_pred, sample_weight=None, decision_threshold=None, display: bool = False, auxiliary_metrics=True, detailed_report=False, **kwargs) dict [source]¶
根据真实标签评估提供的预测概率。评估基于先前在 init 中指定的 eval_metric,如果未指定,则使用默认指标。
- 参数:
y_true (
np.array
或pd.Series
) – 真实标签的有序集合。y_pred (
pd.Series
或pd.DataFrame
) – 预测概率或预测结果的有序集合。可通过 predictor.predict_proba 的输出获得。注意:对于某些类型的 eval_metric(例如 ‘roc_auc’),y_pred 必须是预测概率而不是预测标签。sample_weight (
pd.Series
, 默认值 = None) – 每行数据的样本权重。如果为 None,则使用均匀样本权重。decision_threshold (float, 默认值 = None) – 将预测概率转换为预测结果时使用的决策阈值。这将影响 f1 和 accuracy 等指标的得分。如果为 None,则默认为 predictor.decision_threshold。除非 problem_type=’binary’,否则此参数会被忽略。有关更多信息,请参阅 predictor.decision_threshold 文档字符串。
display (bool, 默认值 = False) – 如果为 True,则打印性能结果。
auxiliary_metrics (bool, 默认值 = True) – 除了默认指标外,是否还应计算其他(特定于 problem_type 的)指标?
detailed_report (bool, 默认值 = False) – 是否应计算更详细版本的 auxiliary_metrics?(需要 auxiliary_metrics = True)
- 返回值:
返回一个字典,其中键 = 指标,值 = 每个指标的表现。
注意 (指标分数始终以“越高越好”的形式显示。)
这意味着 log_loss 和 root_mean_squared_error 等指标的符号将被反转,值将为负。