@@ -84,7 +84,7 @@ res_boruta <- feature.selection.boruta(
8484## ** Train Machine Learning models**
8585
8686Train and tune models using repeated stratified k-fold cross-validation:
87- ``` {r}
87+ ``` {r, eval = FALSE }
8888deconvolution = pipeML::deconvolution
8989traitData = pipeML::traitData
9090res <- compute_features.training.ML(features_train = deconvolution,
@@ -116,7 +116,7 @@ knitr::include_graphics("figures/Training.png")
116116```
117117
118118To apply model stacking, set ` stack = TRUE ` :
119- ``` {r}
119+ ``` {r, eval = FALSE }
120120res <- compute_features.training.ML(features_train = deconvolution,
121121 target_var = traitData$Best.Confirmed.Overall.Response,
122122 task_type = "classification",
@@ -132,7 +132,7 @@ res <- compute_features.training.ML(features_train = deconvolution,
132132```
133133
134134Inspect the base models used in stacking:
135- ``` {r}
135+ ``` {r, eval = FALSE }
136136res$Model$Base_models
137137```
138138
@@ -273,16 +273,16 @@ for (cohort in unique(traitData$Cohort)) {
273273 features_train = features_all[rownames(features_all)%in%rownames(traitData_train),]
274274
275275 #### ML Training
276- res = compute_features.training.ML(features_train,
277- traitData_train$Response,
276+ res = compute_features.training.ML(features_train = features_train ,
277+ target_var = traitData_train$Response,
278278 task_type = "classification",
279279 trait.positive = "R",
280280 metric = "AUROC",
281281 stack = T,
282282 k_folds = 2,
283283 n_rep = 3,
284284 LODO = TRUE,
285- batch_var = " Cohort" ,
285+ batch_var = traitData_train$ Cohort,
286286 ncores = 2,
287287 return = F)
288288
0 commit comments