catboost CatBoostClassifier 中 custom_loss 和 custom_metric 之间的区别

difference between custom_loss and custom_metric in catboost CatBoostClassifier

我正在尝试学习 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 是什么?

我看到 custom_loss 在 R 文档中定义: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

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

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