shrink

Shrink the model. Only trees with indices from the range [ntree_start, ntree_end) are kept.

Method call format

shrink(ntree_end, ntree_start=0)

Parameters

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

Note

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.