【问题标题】:difference between custom_loss and custom_metric in catboost CatBoostClassifiercatboost CatBoostClassifier 中 custom_loss 和 custom_metric 的区别
【发布时间】:2021-07-13 22:19:37
【问题描述】:

我正在尝试学习 catboost,但我看到两个与 CatBoostClassifier 混淆的术语:

custom_losscustom_metric

我在这里浏览过:https://catboost.ai/docs/concepts/python-reference_parameters-list.html#python-reference_parameters-list

custom_metric: Metric values to output during training. These functions are not optimized and are displayed for informational purposes only. Some metrics support optional parameters (see the Objectives and metrics section for details on each metric).

那么custom_loss 是什么?

我在 R 文档中看到 custom_loss 定义:https://catboost.ai/docs/features/loss-functions-desc.html - 但在 python 文档中没有。

还没有。在 python tutorial 上,他们定义了一个 custom_loss,如下所示:

model = CatBoostClassifier(
    custom_loss=['Accuracy'],
    random_seed=42,
    logging_level='Silent'
)

我在这里遗漏了什么吗?事实上,custom_loss 在 python 文档中的任何地方似乎都没有被定义为属性:https://catboost.ai/docs/concepts/python-reference_parameters-list.html#python-reference_parameters-list

【问题讨论】:

    标签: python scikit-learn xgboost catboost


    【解决方案1】:

    我从文档中的this link 推断出以下内容。

    我几乎可以肯定它们引用了相同的参数,但 custom_loss 是 R 名称,而 custom_metric 是 Python。显然它们可以互换使用,只要它们不会导致名称冲突。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-03-15
      • 2019-12-25
      • 2023-04-09
      • 2018-03-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多