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

# catboost.shrink

```r
catboost.shrink(model,
                ntree_end,
                ntree_start = 0)
```

## Purpose {#purpose}

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


## Arguments {#arguments}
### model

#### Description

The model obtained as the result of training.


**Default value**

Required argument

### ntree_end


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

**Default value**

Required argument

### ntree_start


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

**Default value**

0

