Fits weighted machine learning models for complex survey data using a replicate weights approach that accounts for sampling weights, strata, and clusters. Weighted versions of Elastic Net, XGBoost, and random forest are provided for linear and logistic regression, along with parallelized tuning-parameter search and companion plotting methods.
MLSurvey is a R-package to develop Machine Learning models for complex survey data using suitable Cross-Validation methods: replicate weights methods. This ML tool currently offers weighted Elastic Net (wElnet) for a single $\alpha$, its CPU parallel computing (par_wElnet) for a sequence of $\alpha$'s, generic plots (plot) and ggplot2 supported counterparts (autoplot) for both computation results. It also supports weighted random forest (wRandomforest), and weighted XGBoost (wXGBoost) with random optimal (hyper-)parameter search (optim_wxgb_para). Confidential interval (ci_wauc) for weighted area under the ROC curve (wAUC) is computed by bootstrap.
Since all the weighted ML methods are extended by existing algorithms, glmnet, xgboost, and randomForest, final models can benefit from the functionality of corresponding original packages to get more comprehensive results, such as importance plots, prediction, etc. NOTE : The package is developed for linear/logistic regression. For other models supported by their parent packages, the weighted counterparts can be developed depending on demand.
FYI, all weighted performance metrics-- wAUC, wROC, wSensitivity, and wSpecificity--can be computed by R-svyROC. All the ML methods are incorporated with replicate weights methods: JKn, bootstrap, subbootstrap, BRR by R-survey, dCV, split, and extrapolation by R-svyVarSel.
A brief start guide can be found in vignettes.
To install from CRAN,
install.packages("MLSurvey")
library(MLSurvey)
To install from the source (GitHub),
library(devtools)
install_github("hkim-fda/MLSurvey")
Or simply,
devtools::install_github("hkim-fda/MLSurvey")