About training and hyperparameters optimization
During training and hyperparameters optimization the following steps happen:
Models are trained with currently optimal hyperparameters on all but last folds from cv
After training models make prediction on test parts of corresponding validation folds
Quality of predictions is assessed with validation metric
Obtained validation metrics are averaged
One more model is trained with currently optimal hyperparameters, but now on test fold.
Test model makes predictions on test part of test fold.
Validation metrics, trained models and obtained metrics are logged to a server.
Average validation metric is used as metric representing quality of current hyperparameters
Optuna updates optimal hyperparameters and steps are repeated