mixgb()xgb.train():
num_class now passed through params list,
need to set num_class=NULL for non-multiclass
imputation.mixgb_null() function for better readability
and maintainability - using helper functions in
impute_each.R. Other relevant functions will be updated
later.-framework Accelerate flag for
Linux builds in Makevars file ### related to XGBoost
Parameter Changesxgb.train():
num_class now passed through params
list.reshape = TRUE argument in
predict() function as it is deprecated in XGBoost >=
2.0.0.xgb.train():
watchlist is changed to evalsobjective and eval_metric are now passed
through params list.xgb.cv():
sparse.model.matrix into
xgb.DMatrix format. Note, this is a quick fix for minimal
safe change, and we plan to further optimise data handling in future
releases.best.nrounds is now obtained via
cv.train$early_stop$best_iteration instead of
cv.train$best_iteration.cbind2(Mis.m, Obs.m) that occurred when
the imputed dataset had only a single incomplete variable.
Mis.m (a matrix of
all other incomplete variables except the currently imputed one) was a
0x0 matrix, which caused error during binding.vismi packagedrop.unused.levels = FALSE in
fac2sparse() to prevent dropping unused levels in factor or
ordinal factor.
save_yhatobs() for Type 1 pmm.mixgb() for large datasets:
mixgb(). Users can
still use bootstrap in the archived function mixgb0().PMM is now set to NULL by default.xgb.save() and xgb.load() from XGBoost.device.gpu_id and
predictor.tree_method = "hist" by default, aligning with
XGBoost 2.0.0.save.models.folder in
mixgb().
xgb.save(), a method
recommended by XGBoost for future compatibility.save.models.folder is specified, the return object
of mixgb() includes the current imputed datasets,
directories for imputation models, and relevant parameters. This object
can save using saveRDS() as it doesn’t directly contain the
models. Users can later load this object into R and employ
impute_new(object, newdata, ...) for new data
imputation.mixgb(data,...) to support datasets with
diverse data types:
Note: Users must manually convert character variables to factors.
default_params(), an auxiliary function for
mixgb(), to validate the list of XGBoost hyperparameters
supplied by the user. It simplifies hyperparameter modifications without
requiring explicit specification of all default values.plot_hist() and plot_bar() to
align with changes in ggplot2 3.4.0:
..density.. with
after_stat(density) in plot_hist()...prop.. with after_stat(prop) in
plot_bar().nthread = 2 to comply with CRAN
policies.subsample = 0.7, becomes the default method due to
identified biases with bootstrapping in certain scenarios.
mixgb():
subsample = 0.7.bootstrap = FALSE.createNA() function.mixgb():
ordinalAsInteger: Changes from TRUE to
FALSE.max_depth: Changes from 6 to 3.nrounds: Changes from 50 to 100.bootstrap: Sets to TRUE by default.mixgb as xgboost requires OpenMP for
multi-core operations. For details, please refer to OpenMP for Mac.