staged_predict
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]
.
Method call format
staged_predict(data,
prediction_type='RawFormulaVal',
ntree_start=0,
ntree_end=0,
eval_period=1,
thread_count=-1,
verbose=None)
Parameters
Parameter | Possible types | Description | Default value |
---|---|---|---|
data |
| A file or matrix with the input dataset. | Required parameter |
prediction_type | string | The required prediction type. Supported prediction types:
| RawFormulaVal |
ntree_start | int | To reduce the number of trees to use when the model is applied or the metrics are calculated, set the range of the tree indices to This parameter defines the index of the first tree to be used when applying the model or calculating the metrics (the inclusive left border of the range). Indices are zero-based. | 0 |
ntree_end | int | To reduce the number of trees to use when the model is applied or the metrics are calculated, set the range of the tree indices to This parameter defines the index of the first tree not to be used when applying the model or calculating the metrics (the exclusive right border of the range). Indices are zero-based. | 0 (the index of the last tree to use equals to the number of trees in the model minus one) |
eval_period | int | To reduce the number of trees to use when the model is applied or the metrics are calculated, set the range of the tree indices to This parameter defines the step of the trees to use for the staged prediction mode. In this mode the results for the | 1 (the trees are applied sequentially: the first tree, then the first two trees, etc.) |
thread_count | int | The number of threads to use during training. Optimizes the speed of execution. This parameter doesn't affect results. | -1 (the number of threads is equal to the number of processor cores) |
verbose | bool | Output the measured evaluation metric to stderr. | None |
Parameter | Possible types | Description | Default value |
---|---|---|---|
data |
| A file or matrix with the input dataset. | Required parameter |
prediction_type | string | The required prediction type. Supported prediction types:
| RawFormulaVal |
ntree_start | int | To reduce the number of trees to use when the model is applied or the metrics are calculated, set the range of the tree indices to This parameter defines the index of the first tree to be used when applying the model or calculating the metrics (the inclusive left border of the range). Indices are zero-based. | 0 |
ntree_end | int | To reduce the number of trees to use when the model is applied or the metrics are calculated, set the range of the tree indices to This parameter defines the index of the first tree not to be used when applying the model or calculating the metrics (the exclusive right border of the range). Indices are zero-based. | 0 (the index of the last tree to use equals to the number of trees in the model minus one) |
eval_period | int | To reduce the number of trees to use when the model is applied or the metrics are calculated, set the range of the tree indices to This parameter defines the step of the trees to use for the staged prediction mode. In this mode the results for the | 1 (the trees are applied sequentially: the first tree, then the first two trees, etc.) |
thread_count | int | The number of threads to use during training. Optimizes the speed of execution. This parameter doesn't affect results. | -1 (the number of threads is equal to the number of processor cores) |
verbose | bool | Output the measured evaluation metric to stderr. | None |
Type of return value
- Probability or RawFormulaVal — Floating point numbers
- Class — A number that represents the class or a string that represents the label of the class (depends on the specification of the classes in the Training dataset).