train

train(params, 
      pool=None,
      iterations=None,
      evals=None, 
      verbose=None, 
      dtrain=None, 
      logging_level=None, 
      num_boost_round=None, 
      eval_set=None, 
      plot=None)

Purpose

Train a model.

Note.

Training on GPU requires NVIDIA Driver of version 390.xx or higher.

Parameters

ParameterPossible typesDescriptionDefault valueSupported processing units
paramsdict

The list of parameters to start training with.

Required parameter

CPU and GPU

pool

Alias: dtrain

catboost.PoolThe input training dataset in the form of a pool object.Required parameter

CPU and GPU

iterations

Alias: num_boost_round

int

The maximum number of trees that can be built when solving machine learning problems.

When using other parameters that limit the number of iterations, the final number of trees may be less than the number specified in this parameter.

1000

CPU and GPU

eval_set

Alias: evals

  • catboost.Pool
  • list of catboost.Pool
  • list of (X, y) tuples
The validation dataset or datasets used for the following processes:
None

CPU and GPU

Note. Only a single validation dataset can be input if the training is performed on GPU
verbosestring

Output the following data to stdout:

  • optimized metric
  • elapsed time of training
  • remaining time of training
Note. Should not be used with the logging_level parameter.
None

CPU and GPU

logging_levelstring

The logging level to output to stdout.

Possible values:
  • Silent — Do not output any logging information to stdout.

  • Verbose — Output the following data to stdout:

    • optimized metric
    • elapsed time of training
    • remaining time of training
  • Info — Output additional information and the number of trees.

  • Debug — Output debugging information.
Restriction. Should not be used with the verbose parameter.
None (corresponds to the Verbose logging level)

CPU and GPU

plotbool
Plot the following information during training:
  • the metric values;
  • the custom loss values;
  • the time has passed since training started;
  • the remaining time until the end of training.
This option can be used if training is performed in Jupyter notebook.
False

CPU