Debian Codegraph @

man/xgb.cb.save.model.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/callbacks.R
3 \name{xgb.cb.save.model}
4 \alias{xgb.cb.save.model}
5 \title{Callback for saving a model file}
6 \usage{
7 xgb.cb.save.model(save_period = 0, save_name = "xgboost.ubj")
8 }
9 \arguments{
10 \item{save_period}{Save the model to disk after every \code{save_period} iterations;
11 0 means save the model at the end.}
12
13 \item{save_name}{The name or path for the saved model file.
14 It can contain a \code{\link[=sprintf]{sprintf()}} formatting specifier to include the integer
15 iteration number in the file name. E.g., with \code{save_name = 'xgboost_\%04d.model'},
16 the file saved at iteration 50 would be named "xgboost_0050.model".}
17 }
18 \value{
19 An \code{xgb.Callback} object, which can be passed to \code{\link[=xgb.train]{xgb.train()}},
20 but \strong{not} to \code{\link[=xgb.cv]{xgb.cv()}}.
21 }
22 \description{
23 This callback function allows to save an xgb-model file, either periodically
24 after each \code{save_period}'s or at the end.
25
26 Does not leave any attribute in the booster.
27 }