---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://catboost.ai/docs/en/concepts/python-reference_catboostregressor_attributes.md
  - href: en/concepts/python-reference_catboostregressor_attributes.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

# Attributes

## tree_count_ {#tree_count_}

#### Purpose

Return the number of trees in the model.

This number can differ from the value specified in the `--iterations` training parameter in the following cases:
- The training is stopped by the [overfitting detector](https://catboost.ai/docs/en/concepts/overfitting-detector.md).
- The `--use-best-model` training parameter is set to <q>True</q>.

#### Type
int


## feature_importances_ {#feature_importances_}

#### Purpose

Return the calculated [feature importances](https://catboost.ai/docs/en/concepts/fstr.md). The output data depends on the type of the model's loss function:
- Non-ranking loss functions — [PredictionValuesChange](https://catboost.ai/docs/en/concepts/fstr.md#regular-feature-importance)
- Ranking loss functions — [LossFunctionChange](https://catboost.ai/docs/en/concepts/fstr.md#regular-feature-importances__lossfunctionchange)

If the corresponding feature importance is not calculated the returned value is <q>None</q>.

Use the `` function to surely calculate the [LossFunctionChange](https://catboost.ai/docs/en/concepts/fstr.md#regular-feature-importances__lossfunctionchange) feature importance.

#### Type
numpy.ndarray


## random_seed_ {#random_seed_}

#### Purpose

The random seed used for training.

#### Type

int


## learning_rate_ {#learning_rate_}

#### Purpose

The learning rate used for training.

#### Type
float


## feature_names_ {#feature_names_}

#### Purpose

The names of features in the dataset.

#### Type
list


## evals_result_ {#eval_result_}

#### Purpose

Return the values of metrics calculated during the training.

{% note info %}

Only the values of calculated metrics are output. The following metrics are not calculated by default for the training dataset and therefore these metrics are not output:

- PFound
- YetiRank
- NDCG
- YetiRankPairwise
- AUC
- NormalizedGini
- FilteredDCG
- DCG

Use the `hints=skip_train~false` parameter to enable the calculation. See the [Enable, disable and configure metrics calculation](https://catboost.ai/docs/en/concepts/loss-functions.md#enable-disable-configure-metrics) section for more details.

{% endnote %}

#### Type

dict

Output format:
```no-highlight
{pool_name: {metric_name_1-1: [value_1, value_2, .., value_N]}, .., {metric_name_1-M: [value_1, value_2, .., value_N]}}
```

For example:
```no-highlight
{'learn': {'Logloss': [0.6720840012056274, 0.6476800666988386, 0.6284055381249782], 'AUC': [1.0, 1.0, 1.0], 'CrossEntropy': [0.6720840012056274, 0.6476800666988386, 0.6284055381249782]}}
```


## best_score_ {#best_score}

#### Purpose

<!-- source: en/_includes/work_src/reusage/python__method__get_best_score__desc.md -->
Return the best result for each metric calculated on each validation dataset.
<!-- endsource: en/_includes/work_src/reusage/python__method__get_best_score__desc.md -->


<!-- source: en/_includes/work_src/reusage/only-the-calculated-metrics-are-output.md -->
{% note info %}

Only the values of calculated metrics are output. The following metrics are not calculated by default for the training dataset and therefore these metrics are not output:

- PFound
- YetiRank
- NDCG
- YetiRankPairwise
- AUC
- NormalizedGini
- FilteredDCG
- DCG

Use the `hints=skip_train~false` parameter to enable the calculation. See the [Enable, disable and configure metrics calculation](https://catboost.ai/docs/en/concepts/loss-functions.md#enable-disable-configure-metrics) section for more details.

{% endnote %}
<!-- endsource: en/_includes/work_src/reusage/only-the-calculated-metrics-are-output.md -->

#### Type

dict

Output format:
```bash
{pool_name_1: {metric_1: value,..., metric_N: value}, ..., pool_name_M: {metric_1: value,..., metric_N: value}
```

For example:
```bash
{'validation': {'Logloss': 0.6085537606941837, 'AUC': 0.0}}
```


## best_iteration_ {#best_iteration}

#### Purpose

<!-- source: en/_includes/work_src/reusage/python__method__get_best_iteration__desc.md -->
Return the identifier of the iteration with the best result of the evaluation metric or loss function on the last validation set.
<!-- endsource: en/_includes/work_src/reusage/python__method__get_best_iteration__desc.md -->


#### Type

int or None if the validation dataset is not specified.

