R: Apply the model for each tree

catboost.staged_predict {catboost} | R Documentation

## Apply the model for each tree

### Description

Apply the model to the given dataset and calculate the results for each i-th tree of the model taking into consideration only the trees in the range [1;i].

Peculiarities: In case of multiclassification the prediction is returned in the form of a matrix. Each line of this matrix contains the predictions for one object of the input dataset.

### Usage

    catboost.staged_predict(
      model,
      pool,
      verbose = FALSE,
      prediction_type = "RawFormulaVal",
      ntree_start = 0,
      ntree_end = 0,
      eval_period = 1,
      thread_count = -1
    )

### Arguments

`model` | The model obtained as the result of training. Default value: Required argument
`pool` | The input dataset. Default value: Required argument
`verbose` | Verbose output to stdout. Default value: FALSE (not used)
`prediction_type` | The format for displaying approximated values in output data (see https://catboost.ai/docs/concepts/output-data.html). Possible values: 'Probability' 'Class' 'RawFormulaVal' Default value: 'RawFormulaVal'
`ntree_start` | Model is applied on the interval [ntree_start, ntree_end) with the step eval_period (zero-based indexing). Default value: 0
`ntree_end` | Model is applied on the interval [ntree_start, ntree_end) with the step eval_period (zero-based indexing). Default value: 0 (if value equals to 0 this parameter is ignored and ntree_end equal to tree_count)
`eval_period` | Model is applied on the interval [ntree_start, ntree_end) with the step eval_period (zero-based indexing). Default value: 1
`thread_count` | The number of threads to use when applying the model. If -1, then the number of threads is set to the number of CPU cores. Allows you to optimize the speed of execution. This parameter doesn't affect results. Default value: 1

### Value

List object with predictions from one iteration.

### See Also

https://catboost.ai/docs/concepts/r-reference_catboost-staged_predict.html

[Package catboost version 0.26 Index]