This callback function allows to save an xgb-model file, either periodically
after each save_period's or at the end.
Does not leave any attribute in the booster.
Arguments
- save_period
Save the model to disk after every
save_perioditerations; 0 means save the model at the end.- save_name
The name or path for the saved model file. It can contain a
sprintf()formatting specifier to include the integer iteration number in the file name. E.g., withsave_name = 'xgboost_%04d.model', the file saved at iteration 50 would be named "xgboost_0050.model".
Value
An xgb.Callback object, which can be passed to xgb.train(),
but not to xgb.cv().