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 [1;i].

Choose the implementation for more details.

Python package

Classes

CatBoost

Class purpose

Training and applying models.

Method

staged_predict

Description

Apply the model to the given dataset and calculate the results taking into consideration only the trees in the range [0; i).

CatBoostRegressor

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

Description

Apply the model to the given dataset and calculate the results taking into consideration only the trees in the range [0; i).

CatBoostClassifier

Class purpose

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

Methods

staged_predict

Description

Apply the model to the given dataset and calculate the results taking into consideration only the trees in the range [0; i).

staged_predict_proba

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 method:

Purpose

Apply the model to the given dataset and calculate the results for the specified trees only.

Command-line version

For the catboost calc command:

Purpose

Apply the model.

Command keys

--eval-period

Key description

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

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).