View source: R/xgboostImpute.R
xgboostImpute | R Documentation |
Impute missing values based on a random forest model using xgboost::xgboost()
xgboostImpute(
formula,
data,
imp_var = TRUE,
imp_suffix = "imp",
verbose = FALSE,
nrounds = 100,
objective = NULL,
...
)
formula |
model formula for the imputation |
data |
A |
imp_var |
|
imp_suffix |
suffix used for TF imputation variables |
verbose |
Show the number of observations used for training
and evaluating the RF-Model. This parameter is also passed down to
|
nrounds |
max number of boosting iterations,
argument passed to |
objective |
objective for xgboost,
argument passed to |
... |
Arguments passed to |
the imputed data set.
Other imputation methods:
hotdeck()
,
impPCA()
,
irmi()
,
kNN()
,
matchImpute()
,
medianSamp()
,
rangerImpute()
,
regressionImp()
,
sampleCat()
data(sleep)
xgboostImpute(Dream~BodyWgt+BrainWgt,data=sleep)
xgboostImpute(Dream+NonD~BodyWgt+BrainWgt,data=sleep)
xgboostImpute(Dream+NonD+Gest~BodyWgt+BrainWgt,data=sleep)
sleepx <- sleep
sleepx$Pred <- as.factor(LETTERS[sleepx$Pred])
sleepx$Pred[1] <- NA
xgboostImpute(Pred~BodyWgt+BrainWgt,data=sleepx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.