improve doc in predict
This commit is contained in:
parent
025ca170ec
commit
b973a4dcaa
@ -12,7 +12,7 @@ setClass("xgb.Booster")
|
|||||||
#' untransformed margin value. In logistic regression, outputmargin=T will
|
#' untransformed margin value. In logistic regression, outputmargin=T will
|
||||||
#' output value before logistic transformation.
|
#' output value before logistic transformation.
|
||||||
#' @param ntreelimit limit number of trees used in prediction, this parameter is only valid for gbtree, but not for gblinear.
|
#' @param ntreelimit limit number of trees used in prediction, this parameter is only valid for gbtree, but not for gblinear.
|
||||||
#' set it to be value bigger than 0
|
#' set it to be value bigger than 0. It will use all trees by default.
|
||||||
#' @examples
|
#' @examples
|
||||||
#' data(iris)
|
#' data(iris)
|
||||||
#' bst <- xgboost(as.matrix(iris[,1:4]),as.numeric(iris[,5]), nrounds = 2)
|
#' bst <- xgboost(as.matrix(iris[,1:4]),as.numeric(iris[,5]), nrounds = 2)
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
\alias{predict,xgb.Booster-method}
|
\alias{predict,xgb.Booster-method}
|
||||||
\title{Predict method for eXtreme Gradient Boosting model}
|
\title{Predict method for eXtreme Gradient Boosting model}
|
||||||
\usage{
|
\usage{
|
||||||
\S4method{predict}{xgb.Booster}(object, newdata, outputmargin = FALSE)
|
\S4method{predict}{xgb.Booster}(object, newdata, outputmargin = FALSE,
|
||||||
|
ntreelimit = NULL)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{object}{Object of class "xgb.Boost"}
|
\item{object}{Object of class "xgb.Boost"}
|
||||||
@ -16,6 +17,9 @@
|
|||||||
value of sum of functions, when outputmargin=TRUE, the prediction is
|
value of sum of functions, when outputmargin=TRUE, the prediction is
|
||||||
untransformed margin value. In logistic regression, outputmargin=T will
|
untransformed margin value. In logistic regression, outputmargin=T will
|
||||||
output value before logistic transformation.}
|
output value before logistic transformation.}
|
||||||
|
|
||||||
|
\item{ntreelimit}{limit number of trees used in prediction, this parameter is only valid for gbtree, but not for gblinear.
|
||||||
|
set it to be value bigger 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.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user