* [R] better argument check in xgb.DMatrix; fixes #1480 * [R] showsd was a dummy; fixes #2044 * [R] better categorical encoding explanation in vignette; fixes #1989 * [R] new roxygen version docs update
34 lines
1.1 KiB
R
34 lines
1.1 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/callbacks.R
|
|
\name{cb.save.model}
|
|
\alias{cb.save.model}
|
|
\title{Callback closure for saving a model file.}
|
|
\usage{
|
|
cb.save.model(save_period = 0, save_name = "xgboost.model")
|
|
}
|
|
\arguments{
|
|
\item{save_period}{save the model to disk after every
|
|
\code{save_period} iterations; 0 means save the model at the end.}
|
|
|
|
\item{save_name}{the name or path for the saved model file.
|
|
It can contain a \code{\link[base]{sprintf}} formatting specifier
|
|
to include the integer iteration number in the file name.
|
|
E.g., with \code{save_name} = 'xgboost_%04d.model',
|
|
the file saved at iteration 50 would be named "xgboost_0050.model".}
|
|
}
|
|
\description{
|
|
Callback closure for saving a model file.
|
|
}
|
|
\details{
|
|
This callback function allows to save an xgb-model file, either periodically after each \code{save_period}'s or at the end.
|
|
|
|
Callback function expects the following values to be set in its calling frame:
|
|
\code{bst},
|
|
\code{iteration},
|
|
\code{begin_iteration},
|
|
\code{end_iteration}.
|
|
}
|
|
\seealso{
|
|
\code{\link{callbacks}}
|
|
}
|