View source: R/xgbStandardize.r
xgbStandardize | R Documentation |
Call the xgbStandardize function in lieu of the xgboost function to be able to use the xgboost function by using a formula and data frame to learn a model, to use the gridCV function in the buildmodels package and to make predictions.
xgbStandardize(formula, data, .round = 0, ...)
formula |
Model formula used to learn or predict the model |
data |
Input to the model in a data frame format |
If numeric values are passed as the dependent variable in the formula,
it is converted to a factor rounded to the nearest integer. The rounding
can be changed by using the @param .round parameter and passing to it the
digits from the @seealso base::round()
function.
The xgbStandardize also overrides the behavior of the prediction function for an xgb.standard model. This allows for the pass through of data frame as the data object, and provides the prediction probabilities if decision.value == TRUE.
A model with the list values of xgboost with new values for predictor and predictor.factors
xgboost::xgboost()
model.xgb <- xgbStardize(status~., data, nrounds = 100, eta = 0.01) pred.xgb <- predict(model.xgb, newdata=data) prob.xgb <- predict(model.xgb, newdata=data, decision.values=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.