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

# get_roc_curve

<!-- source: en/_includes/work_src/reusage-python/get_roc_curve__desc.md -->
Return points of the ROC curve.
<!-- endsource: en/_includes/work_src/reusage-python/get_roc_curve__desc.md -->


This information is used to plot the ROC curve.

## Method call format {#call-format}

```python
get_roc_curve(model,
              data,
              thread_count=-1,
              plot=False)
```

## Parameters {#parameters}

### model

#### Description

The trained model.

**Possible types**

catboost.CatBoost

**Default value**

Required parameter

### data

#### Description

A set of samples to build the ROC curve with.

**Possible types**

- catboost.Pool
- list of catboost.Pool

**Default value**

Required parameter


### thread_count

#### Description

The number of threads to use.

<!-- 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 -->

**Possible type**

int

**Default value**

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

### plot

#### Description

Plot a chart based on the found points.

**Possible types**

bool

**Default value**

False

## Type of return value {#output-format}

tuple of three arrays (fpr, tpr, thresholds)

## Usage examples {#usage-examples}

```python
from catboost import CatBoostClassifier, Pool
from catboost.utils import get_roc_curve

train_data = [[1,3],
              [0,4],
              [1,7],
              [0,3]]
train_labels = [1,0,1,1]
catboost_pool = Pool(train_data, train_labels)
model = CatBoostClassifier(learning_rate=0.03)
model.fit(train_data, train_labels, verbose=False)
(fpr, tpr, thresholds) = get_roc_curve(model, catboost_pool, plot=True)
print(fpr)
print(tpr)
print(thresholds)
```

Output:
```bash
[0. 0. 0. 0. 1.]
[0.         0.33333333 0.66666667 1.         1.        ]
[1.         0.53533186 0.52910032 0.50608183 0.        ]
```

