Improve predict function documentation
This commit is contained in:
parent
88e7c6012b
commit
8233d589b6
@ -20,6 +20,17 @@ setClass("xgb.Booster",
|
|||||||
#' only valid for gbtree, but not for gblinear. set it to be value bigger
|
#' only valid for gbtree, but not for gblinear. set it to be value bigger
|
||||||
#' than 0. It will use all trees by default.
|
#' than 0. It will use all trees by default.
|
||||||
#' @param predleaf whether predict leaf index instead. If set to TRUE, the output will be a matrix object.
|
#' @param predleaf whether predict leaf index instead. If set to TRUE, the output will be a matrix object.
|
||||||
|
#'
|
||||||
|
#' @details
|
||||||
|
#' The option \code{ntreelimit} purpose is to let the user train a model with lots
|
||||||
|
#' of trees but use only the first trees for prediction to avoid overfitting
|
||||||
|
#' (without having to train a new model with less trees).
|
||||||
|
#'
|
||||||
|
#' The option \code{predleaf} purpose is inspired from §3.1 of the paper
|
||||||
|
#' \code{Practical Lessons from Predicting Clicks on Ads at Facebook}.
|
||||||
|
#' The idea is to use the model as a generator of new features which capture non linear link
|
||||||
|
#' from original features.
|
||||||
|
#'
|
||||||
#' @examples
|
#' @examples
|
||||||
#' data(agaricus.train, package='xgboost')
|
#' data(agaricus.train, package='xgboost')
|
||||||
#' data(agaricus.test, package='xgboost')
|
#' data(agaricus.test, package='xgboost')
|
||||||
|
|||||||
@ -31,6 +31,16 @@ than 0. It will use all trees by default.}
|
|||||||
\description{
|
\description{
|
||||||
Predicted values based on xgboost model object.
|
Predicted values based on xgboost model object.
|
||||||
}
|
}
|
||||||
|
\details{
|
||||||
|
The option \code{ntreelimit} purpose is to let the user train a model with lots
|
||||||
|
of trees but use only the first trees for prediction to avoid overfitting
|
||||||
|
(without having to train a new model with less trees).
|
||||||
|
|
||||||
|
The option \code{predleaf} purpose is inspired from §3.1 of the paper
|
||||||
|
\code{Practical Lessons from Predicting Clicks on Ads at Facebook}.
|
||||||
|
The idea is to use the model as a generator of new features which capture non linear link
|
||||||
|
from original features.
|
||||||
|
}
|
||||||
\examples{
|
\examples{
|
||||||
data(agaricus.train, package='xgboost')
|
data(agaricus.train, package='xgboost')
|
||||||
data(agaricus.test, package='xgboost')
|
data(agaricus.test, package='xgboost')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user