predict.xgb.Booster.prmdt | R Documentation |
Return prediction for a xgb.train
model.
## S3 method for class 'xgb.Booster.prmdt' predict( object, newdata, type = "class", missing = NA, outputmargin = FALSE, ntreelimit = NULL, predleaf = FALSE, predcontrib = FALSE, approxcontrib = FALSE, predinteraction = FALSE, reshape = FALSE, ... )
object |
a |
newdata |
an optional data frame in which to look for variables with which to predict. |
type |
type of prediction 'prob' or 'class' (default). |
missing |
Missing is only used when input is dense matrix. Pick a float value that represents missing values in data (e.g., sometimes 0 or some other extreme value is used). |
outputmargin |
whether the prediction should be returned in the for of original untransformed sum of predictions from boosting iterations' results. E.g., setting outputmargin=TRUE for logistic regression would result in predictions for log-odds instead of probabilities. |
ntreelimit |
Deprecated, use iterationrange instead. |
predleaf |
whether predict leaf index. |
predcontrib |
whether to return feature contributions to individual predictions (see Details). |
approxcontrib |
whether to use a fast approximation for feature contributions (see Details). |
predinteraction |
whether to return contributions of feature interactions to individual predictions (see Details). |
reshape |
whether to reshape the vector of predictions to a matrix form when there are several prediction outputs per case. This option has no effect when either of predleaf, predcontrib, or predinteraction flags is TRUE. |
... |
additional arguments affecting the predictions produced. |
a vector or matrix of predictions for xgb model.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.