Shrink the model. Parameters ---------- ntree_end: int Leave the trees with indices from the interval [ntree_start, ntree_end) (zero-based indexing). ntree_start: int, optional (default=0) Leave the trees with indices from the interva
(self, ntree_end, ntree_start=0)
| 3679 | return result |
| 3680 | |
| 3681 | def shrink(self, ntree_end, ntree_start=0): |
| 3682 | """ |
| 3683 | Shrink the model. |
| 3684 | |
| 3685 | Parameters |
| 3686 | ---------- |
| 3687 | ntree_end: int |
| 3688 | Leave the trees with indices from the interval [ntree_start, ntree_end) (zero-based indexing). |
| 3689 | ntree_start: int, optional (default=0) |
| 3690 | Leave the trees with indices from the interval [ntree_start, ntree_end) (zero-based indexing). |
| 3691 | """ |
| 3692 | if ntree_start > ntree_end: |
| 3693 | raise CatBoostError("ntree_start should be less than ntree_end.") |
| 3694 | self._base_shrink(ntree_start, ntree_end) |
| 3695 | |
| 3696 | def drop_unused_features(self): |
| 3697 | """ |