| Mixgb | R Documentation |
Set up an xgboost imputer object with specified hyperparameters and then obtain multiple imputed datasets
new()Create a new Mixgb object. This is used to set up the multiple imputation imputer using xgboost.
Mixgb$new( data, nrounds = 50, max_depth = 6, gamma = 0.1, eta = 0.3, nthread = 4, early_stopping_rounds = 10, colsample_bytree = 1, min_child_weight = 1, subsample = 1, pmm.k = 5, pmm.type = "auto", pmm.link = "logit", scale_pos_weight = 1, initial.imp = "random", tree_method = "auto", gpu_id = 0, predictor = "auto", print_every_n = 10L, verbose = 0 )
dataA data frame with missing values
nroundsMax number of boosting iterations. Default: 50
max_depthMaximum depth of the tree. Default: 6
gammaDefault: 0.1
etaDefault: 0.3
nthreadDefault: 4
early_stopping_roundsDefault: 10,
colsample_bytreeDefault: 1
min_child_weightDefault: 1
subsampleDefault: 1
pmm.kDefault: 5
pmm.typeDefault: "auto" (used to be NULL)
pmm.linkDefault: "logit"
scale_pos_weightDefault:1
initial.impDefault: "random"
tree_methodDefault: "auto" (can set to "gpu_hist" for machine with NVIDIA GPUs)
gpu_idDevice ordinal. Default: 0
predictorThe type of predictor algorithm to use. Default: "auto" (other options: "cpu_predictor","gpu_predictor")
print_every_nDefault: 10L
verboseDefault: 0
MIXGB=Mixgb$new(withNA.df) MIXGB=Mixgb$new(withNA.df,nrounds=50,max_depth=6)
impute()Use the imputer to impute missing values and obtain multiple datasets
Mixgb$impute(m = 5)
mthe number of imputed datasets. Default: 5
MIXGB=Mixgb$new(withNA.df) imputation.list=MIXGB$impute(m = 5)
## ------------------------------------------------
## Method `Mixgb$new`
## ------------------------------------------------
MIXGB=Mixgb$new(withNA.df)
MIXGB=Mixgb$new(withNA.df,nrounds=50,max_depth=6)
## ------------------------------------------------
## Method `Mixgb$impute`
## ------------------------------------------------
MIXGB=Mixgb$new(withNA.df)
imputation.list=MIXGB$impute(m = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.