Apply a model

Note. The model can not be correctly applied if the order of the columns in the testing and training datasets differs.

Execution format

catboost calc [optional parameters]

Options

OptionDescriptionDefault value

-m

--model-path

The name of the input file with the description of the model obtained as the result of training.

model.bin
--model-format

The format of the input model.

Possible values:
  • CatboostBinary.
  • AppleCoreML (only datasets without categorical features are supported).
  • json (multiclassification models are not currently supported). Refer to the CatBoost JSON model tutorial for format details.
CatboostBinary

--input-path

The name of the input file with the dataset description.

input.tsv

--column-description

--cd

The path to the input file that contains the column descriptions.

If omitted, it is assumed that the first column in the file with the dataset description defines the label value, and the other columns are the values of numerical features.

-o

--output-path

The name of the output file that contains the resulting values of the model for the input objects.

The format depends on the problem being solved.
output.tsv

-T

--thread-count

The number of threads to use during training.

Optimizes the speed of execution. This parameter doesn't affect results.

The number of processor cores

--tree-count-limit

The number of trees from the model to use when applying. If specified, the first <value> trees are used.

0 (if value equals to 0 this parameter is ignored and all trees from the model are used)
--eval-period

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.

This parameter defines the step of the trees to use for the staged prediction mode. In this mode the results for the (n*i)-th tree of the model are calculated taking into consideration only the trees in the range [1;n*i]. The specified value n defines the size of the range of trees to use. The approximate values for the last period are calculated using all trees in the provided segment.

0 (the staged prediction mode is turned off)

--prediction-type

A comma-separated list of prediction types.

Supported prediction types:
  • Probability
  • Class
  • RawFormulaVal
RawFormulaVal