---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://catboost.ai/docs/en/concepts/python-reference_utils.md
---
> **Documentation Index:** Fetch the complete configuration index at https://catboost.ai/docs/en/llms.txt

# utils

Helper utilities.

## Methods {#methods}

### [create_cd](https://catboost.ai/docs/en/concepts/python-reference_utils_create_cd.md)

#### Description

<!-- source: en/_includes/work_src/reusage-python/utils__create_cd__desc.md -->
Generate the [columns description](https://catboost.ai/docs/en/concepts/input-data_column-descfile.md) file with the given structure.
<!-- endsource: en/_includes/work_src/reusage-python/utils__create_cd__desc.md -->

### [eval_metric](https://catboost.ai/docs/en/concepts/python-reference_utils_eval_metric.md)

#### Description

<!-- source: en/_includes/work_src/reusage-python/eval_metric__desc.md -->
Calculate the specified metric on raw approximated values of the formula and label values.
<!-- endsource: en/_includes/work_src/reusage-python/eval_metric__desc.md -->

### [get_confusion_matrix](https://catboost.ai/docs/en/concepts/python-reference_utils_get_confusion_matrix.md)

#### Description

<!-- source: en/_includes/work_src/reusage-python/get_confusion_matrix__desc.md -->
Build a confusion matrix $C$, such that $C_{i,j}$ is equal to the number of observations known to be in group $i$ but predicted to be in group $j$.
<!-- endsource: en/_includes/work_src/reusage-python/get_confusion_matrix__desc.md -->

### [get_gpu_device_count](https://catboost.ai/docs/en/concepts/python-reference_utils_get_gpu_device_count.md)

#### Description

<!-- source: en/_includes/work_src/reusage-python/utils__get-gpu-device-count__desc.md -->
Return the number of available GPU devices.
<!-- endsource: en/_includes/work_src/reusage-python/utils__get-gpu-device-count__desc.md -->

### [get_fnr_curve](https://catboost.ai/docs/en/concepts/python-reference_utils_get_fnr_curve.md)

#### Description

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

### [get_fpr_curve](https://catboost.ai/docs/en/concepts/python-reference_utils_get_fpr_curve.md)

#### Description

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

### [get_roc_curve](https://catboost.ai/docs/en/concepts/python-reference_utils_get_roc_curve.md)

#### Description

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

### [quantize](https://catboost.ai/docs/en/concepts/python-reference_utils_quantize.md)

#### Description

<!-- source: en/_includes/work_src/reusage-python/pool__quantize__p.md -->
Create a pool from a file and quantize it while loading the data. This compresses the size of the initial dataset and provides an opportunity to load huge datasets that can not be loaded to RAM otherwise.

{% note info %}

The input data should contain only numerical features (other types are not currently supported).

{% endnote %}
<!-- endsource: en/_includes/work_src/reusage-python/pool__quantize__p.md -->

### [select_threshold](https://catboost.ai/docs/en/concepts/python-reference_utils_select_threshold.md)

#### Description

<!-- source: en/_includes/work_src/reusage-python/select_decision_boundary__desc.md -->
Return the probability boundary required to achieve the specified false positive or false negative rate.
<!-- endsource: en/_includes/work_src/reusage-python/select_decision_boundary__desc.md -->
