---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://catboost.ai/docs/en/concepts/r-reference_catboost-predict.md
  - href: en/concepts/r-reference_catboost-predict.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

# catboost.predict

```no-highlight
catboost.predict(model,
                 pool,
                 verbose=FALSE,
                 prediction_type=None,
                 ntree_start=0,
                 ntree_end=0,
                 thread_count=-1 (the number of threads is equal to the number of processor cores))
```

## Purpose {#predict-purpose}

<!-- source: en/_includes/work_src/reusage/predict--purpose.md -->
Apply the model to the given dataset.
<!-- endsource: en/_includes/work_src/reusage/predict--purpose.md -->


{% note info %}

<!-- source: en/_includes/work_src/reusage-common-phrases/r__note__predict_note_for_packages_must-contain-all-features__r.md -->
The model prediction results will be correct only if the features data in the `pool` parameter contains all the features used in the model. Typically, the order of these features must match the order of the corresponding columns that is provided during the training. But if feature names are provided both during the training and in the `pool` parameter when applying the model, they can be matched by names instead of the columns order.
<!-- endsource: en/_includes/work_src/reusage-common-phrases/r__note__predict_note_for_packages_must-contain-all-features__r.md -->

{% endnote %}


## Arguments {#arguments}
### model


#### Description
The model obtained as the result of training.

**Default value**

Required argument

### pool

#### Description

The input dataset.


**Default value**

Required argument

### verbose


#### Description
Verbose output to stdout.

**Default value**

FALSE (not used)

### prediction_type


#### Description

The required prediction type.

Supported prediction types:
- Probability
- Class
- RawFormulaVal
- Exponent
- LogProbability


**Default value**

None (Exponent for Poisson and Tweedie, RawFormulaVal for all other loss functions)

### ntree_start


#### Description

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`[ntree_start; ntree_end)`.

<!-- source: en/_includes/work_src/reusage-common-phrases/ntree_start__short-param-desc.md -->
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.
<!-- endsource: en/_includes/work_src/reusage-common-phrases/ntree_start__short-param-desc.md -->



**Default value**

0

### ntree_end


#### Description

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`[ntree_start; ntree_end)`.

<!-- source: en/_includes/work_src/reusage-common-phrases/ntree_end__short-param-desc.md -->
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.
<!-- endsource: en/_includes/work_src/reusage-common-phrases/ntree_end__short-param-desc.md -->



**Default value**

0 (the index of the last tree to use equals to the number of trees in the
                    model minus one)

### thread_count


#### Description

<!-- source: en/_includes/work_src/reusage/thread-count-short-desc.md -->
The number of threads to use for operation.
<!-- endsource: en/_includes/work_src/reusage/thread-count-short-desc.md -->


<!-- source: en/_includes/work_src/reusage/thread_count__cpu_cores__optimizes-the-speed-of-execution.md -->
Optimizes the speed of execution. This parameter doesn't affect results.
<!-- endsource: en/_includes/work_src/reusage/thread_count__cpu_cores__optimizes-the-speed-of-execution.md -->



**Default value**

-1 (the number of threads is equal to the number of processor cores)

## Specifics {#specifics}

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.

