stackBagg.Rd
Main Algorithm
stackBagg(train.data, test.data, xnam, tao, weighting, folds, ens.library, tuneparams = NULL, B = NULL)
train.data | a data.frame with at least the following variables: event-times (censored) in the first column, event indicator in the second column and covariates/features that the user potentially want to use in building the preodiction model. Censored observations must be denoted by the value 0. Main event of interest is denoted by 1. |
---|---|
test.data | a data.frame with the same variables and names that the train.data |
xnam | vector with the names of the covariates to be included in the model |
tao | evaluation time point of interest |
weighting | Procedure to compute the inverse probability of censoring weights. Weighting="CoxPH" and weighting="CoxBoost" model the censoring by the Cox model and CoxBoost model respectively. |
folds | Number of folds |
ens.library | character vector indicating the prediction algorithms to be consider in the analyisis. The prediction algorithms supported by this package are: "ens.glm","ens.gam","ens.lasso","ens.randomForest","ens.svm","ens.bartMachine","ens.knn","ens.nn"). See the function ensBagg::ens.all.algorithms(). |
tuneparams | a list of tune parameters for each machine learning procedure. Name them as gam_param, lasso_param, randomforest_param, svm_param, bart_param, knn_param, nn_param. Default values are the same used for the simulation. |
B | number of bootstrap samples |
a list with the predictions of each machine learning algorithm, the average AUC across folds for each of them, the optimal coefficients,the weights ,an indicator if the optimization procedure has converged and the value of penalization term chosen