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

# CatBoostPredictions

## Basic information

```
java.lang.Object
    ai.catboost.CatBoostPredictions
```

public class CatBoostPredictions extends java.lang.ObjectCatBoost model prediction.

<!-- source: en/_includes/work_src/reusage-java/catboostpredictions__desc.md -->
A wrapper that provides methods for making convenient predictions for certain classes.
<!-- endsource: en/_includes/work_src/reusage-java/catboostpredictions__desc.md -->


## Constructor

```java
CatBoostPredictions(int objectCount,
                    int predictionDimension)
```

Construct the CatBoost model prediction based on the number of objects and the model prediction dimension.

### Methods

#### [copyObjectPredictions](https://catboost.ai/docs/en/concepts/java-reference_catboostpredictions__copyobjectpredictions.md)

Copy the prediction for the specified object.

Modifier and type: double or void


#### [copyRowMajorPredictions](https://catboost.ai/docs/en/concepts/java-reference_catboostpredictions__copyrowmajorpredictions.md)


<!-- source: en/_includes/work_src/reusage-java/java-reference_catboostpredictions__copyrowmajorpredictions__desc.md -->
Return a row-major copy of the prediction matrix.
<!-- endsource: en/_includes/work_src/reusage-java/java-reference_catboostpredictions__copyrowmajorpredictions__desc.md -->

Modifier and type: double



#### [get](https://catboost.ai/docs/en/concepts/java-reference_catboostpredictions__get.md)


<!-- source: en/_includes/work_src/reusage-java/java-reference_catboostpredictions__get__desc.md -->
Return the model prediction for a particular object in a particular dimension.
<!-- endsource: en/_includes/work_src/reusage-java/java-reference_catboostpredictions__get__desc.md -->

Modifier and type: double


#### [getObjectCount](https://catboost.ai/docs/en/concepts/java-reference_catboostpredictions__getobjectcount.md)


<!-- source: en/_includes/work_src/reusage-java/java-reference_catboostpredictions__getobjectcount.md -->
Return the number of objects that contain predictions in the current instance of the class.
<!-- endsource: en/_includes/work_src/reusage-java/java-reference_catboostpredictions__getobjectcount.md -->

Modifier and type: int


#### [getPredictionDimension](https://catboost.ai/docs/en/concepts/java-reference_catboostpredictions__getpredictiondimension.md)


<!-- source: en/_includes/work_src/reusage-java/java-reference_catboostpredictions__getpredictiondimension.md -->
Return the dimension of the prediction. The value corresponds to the dimension of the vector of predictions. For example, it is equal to N for multiclassification tasks in case of N classes.
<!-- endsource: en/_includes/work_src/reusage-java/java-reference_catboostpredictions__getpredictiondimension.md -->

Modifier and type: int


