lightgbm.log_evaluation

lightgbm.log_evaluation(period=1, show_stdv=True)[source]

Create a callback that logs the evaluation results.

By default, standard output resource is used. Use register_logger() function to register a custom logger.

Note

Requires at least one validation data.

Parameters:
  • period (int, optional (default=1)) – The period to log the evaluation results. The last boosting stage or the boosting stage found by using early_stopping callback is also logged.

  • show_stdv (bool, optional (default=True)) – Whether to log stdv (if provided).

Returns:

callback – The callback that logs the evaluation results every period boosting iteration(s).

Return type:

_LogEvaluationCallback