---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://catboost.ai/docs/en/features/custom-loss-functions.md
  - href: en/features/custom-loss-functions.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://catboost.ai/docs/en/llms.txt

# User-defined metrics

A custom Python object can be set as a value for the training metric.

<!-- source: en/_includes/work_src/reusage-common-phrases/classes-params-can-be-used-for-train.md -->
The following parameters can be set for the corresponding classes and are used when the model is trained.
<!-- endsource: en/_includes/work_src/reusage-common-phrases/classes-params-can-be-used-for-train.md -->

**Class**
- [CatBoost](https://catboost.ai/docs/en/concepts/python-reference_catboost.md)
- [CatBoostClassifier](https://catboost.ai/docs/en/concepts/python-reference_catboostclassifier.md)
- [CatBoostRegressor](https://catboost.ai/docs/en/concepts/python-reference_catboostregressor.md)


**Parameters**

`--loss-function`

**Description**

A custom python object can be set as the value of this parameter (see an [example](https://catboost.ai/docs/en/concepts/python-usages-examples.md)).


