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

# shrink

<!-- source: en/_includes/work_src/reusage/shrink__purpose.md -->
Shrink the model. Only trees with indices from the range `[ntree_start, ntree_end)` are kept.
<!-- endsource: en/_includes/work_src/reusage/shrink__purpose.md -->


## Method call format {#call-format}

```
shrink(ntree_end, ntree_start=0)
```

## Parameters {#parameters}

<!-- source: en/_includes/work_src/reusage/shrink__parameters.md -->
### ntree_start

#### Description

А zero-based index of the first tree to be used.

**Possible types**

int

**Default value**

0

### ntree_end

#### Description

А zero-based index of the first tree not to be used.

**Possible types**

int

**Default value**

Required argument
<!-- endsource: en/_includes/work_src/reusage/shrink__parameters.md -->

{% note info %}

<!-- source: en/_includes/work_src/reusage/shrink__bias-of-the-truncated-model.md -->
The bias of the truncated mode depends on the value of the `ntree_start` parameter:
- 0 — the original bias value is used.
- Greater than 0 — the value is set to 0.
<!-- endsource: en/_includes/work_src/reusage/shrink__bias-of-the-truncated-model.md -->

{% endnote %}


