Using the overfitting detector

If overfitting occurs, CatBoost can stop the training earlier than the training parameters dictate. For example, it can be stopped before the specified number of trees are built. This option is set in the starting parameters.

Choose the implementation for more details.

The following parameters can be set for the corresponding methods and are used when the model is trained.

MethodParametersDescription
od_type

The type of the overfitting detector to use.

Possible values:
  • IncToDec
  • Iter
od_pval

The threshold for the IncToDec overfitting detector type. The training is stopped when the specified value is reached. Requires that a validation dataset was input.

The value of this parameter must exceed “0” to turn on the overfitting detection.

od_waitThe number of iterations to continue the training after the iteration with the optimal metric value.
The purpose of this parameter differs depending on the selected overfitting detector type:
  • IncToDec — Ignore the overfitting detector when the threshold is reached and continue learning for the specified number of iterations after the iteration with the optimal metric value.
  • Iter — Consider the model overfitted and stop training after the specified number of iterations since the iteration with the optimal metric value.