---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://catboost.ai/docs/en/features/staged-prediction.md
  - href: en/features/staged-prediction.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

# Staged prediction

CatBoost allows to apply a trained model and calculate the results for each i-th tree of the model taking into consideration only the trees in the range `[0; i)`.

<!-- source: en/_includes/work_src/reusage-common-phrases/choose-the-required-implementation-for-more-details.md -->
Choose the implementation for more details.
<!-- endsource: en/_includes/work_src/reusage-common-phrases/choose-the-required-implementation-for-more-details.md -->


## Python package

### Classes

#### [CatBoost](https://catboost.ai/docs/en/concepts/python-reference_catboost.md)

**Class purpose**

<!-- source: en/_includes/work_src/reusage-python/purpose.md -->
Training and applying models.
<!-- endsource: en/_includes/work_src/reusage-python/purpose.md -->

**Method**

 [staged_predict](https://catboost.ai/docs/en/concepts/python-reference_catboost_staged_predict.md)

**Description**

<!-- source: en/_includes/work_src/reusage/staged_predict--purpose.md -->
Apply the model to the given dataset and calculate the results taking into consideration only the trees in the range [0; i).
<!-- endsource: en/_includes/work_src/reusage/staged_predict--purpose.md -->

#### [CatBoostRegressor](https://catboost.ai/docs/en/concepts/python-reference_catboostregressor.md)

**Class purpose**

Training and applying models for the regression problems. When using the applying methods only the predicted class is returned. Provides compatibility with the scikit-learn tools.

**Method**

 [staged_predict](https://catboost.ai/docs/en/concepts/python-reference_catboostregressor_staged_predict.md)

**Description**

<!-- source: en/_includes/work_src/reusage/staged_predict--purpose.md -->
Apply the model to the given dataset and calculate the results taking into consideration only the trees in the range [0; i).
<!-- endsource: en/_includes/work_src/reusage/staged_predict--purpose.md -->


#### [CatBoostClassifier](https://catboost.ai/docs/en/concepts/python-reference_catboostclassifier.md)

**Class purpose**

Training and applying models for the classification problems. Provides compatibility with the scikit-learn tools.

**Methods**

 [staged_predict](https://catboost.ai/docs/en/concepts/python-reference_catboostclassifier_staged_predict.md)

**Description**

<!-- source: en/_includes/work_src/reusage/staged_predict--purpose.md -->
Apply the model to the given dataset and calculate the results taking into consideration only the trees in the range [0; i).
<!-- endsource: en/_includes/work_src/reusage/staged_predict--purpose.md -->

[staged_predict_proba](https://catboost.ai/docs/en/concepts/python-reference_catboostclassifier_staged_predict_proba.md)

**Class purpose**

The same as staged_predict with the difference that the results are probabilities that the object belongs to the positive class.

## R package

For the [catboost.staged_predict](https://catboost.ai/docs/en/concepts/r-reference_catboost-staged_predict.md) method:

**Purpose**

<!-- source: en/_includes/work_src/reusage-r/staged_predict__purpose.md -->
Apply the model to the given dataset and calculate the results for the specified trees only.
<!-- endsource: en/_includes/work_src/reusage-r/staged_predict__purpose.md -->

## Command-line version

For the [catboost calc](https://catboost.ai/docs/en/concepts/cli-reference_calc-model.md) command:

**Purpose**

<!-- source: en/_includes/work_src/reusage-cli/purpose__apply-the-model.md -->
Apply the model.
<!-- endsource: en/_includes/work_src/reusage-cli/purpose__apply-the-model.md -->

**Command keys**

`--eval-period`

**Key description**

To reduce the number of trees to use when the model is applied or the metrics are calculated, set the step of the trees to use to `eval-period`.

<!-- source: en/_includes/work_src/reusage-common-phrases/cli__eval__period__desc.md -->
This parameter defines the step to iterate over the range `[--ntree-start; --ntree-end)`. For example, let's assume that the following parameter values are set:

- `--ntree-start` is set 0
- `--ntree-end` is set to N (the total tree count)
- `--eval-period` is set to 2

In this case, the results are returned for the following tree ranges: `[0, 2)`, `[0, 4)`, ... , `[0, N)`.
<!-- endsource: en/_includes/work_src/reusage-common-phrases/cli__eval__period__desc.md -->

