Executes machine learning pipeline for MDR analysis using logistic regression with parallel processing via the future backend. Trains models on all MDR parquet files and saves results to designated output directories.

runMDRmodels(
  path,
  threads = 16,
  split = c(0.8, 0),
  n_fold = 5,
  prop_vi_top_feats = c(0, 1),
  pca_threshold = 0.99,
  verbose = TRUE,
  return_tune_res = TRUE,
  return_fit = TRUE,
  return_pred = TRUE,
  use_saved_split = TRUE,
  shuffle_labels = FALSE,
  use_pca = FALSE
)

Arguments

path

Character scalar. Base directory containing MDR matrix files.

threads

Integer. Number of parallel workers for model training. Default is 16.

split

Numeric vector of length 2. Train/validation split proportions.

n_fold

Integer. Number of cross-validation folds. Default 5.

prop_vi_top_feats

Numeric vector of length 2. Proportion range for variable-importance selection.

pca_threshold

Numeric. PCA variance threshold. Default 0.99.

verbose

Logical. Print progress messages during model training. Default TRUE.

return_tune_res

Logical. Return tuning results from cross-validation. Default TRUE.

return_fit

Logical. Return fitted model objects. Default TRUE.

return_pred

Logical. Return prediction results. Default TRUE.

use_saved_split

Logical. Whether to inherit split/seed/n_fold from ml_parameters.json. Default TRUE.

shuffle_labels

Logical. Randomly shuffle labels for baseline runs. Default FALSE.

use_pca

Logical. Use PCA on predictors. Default FALSE.

Value

NULL (invisible). Called for side effects (model training and result saving).

See also

createMLinputList for generating input file lists, runMLmodels for non-MDR model execution

Examples

if (FALSE) { # \dontrun{
# Run MDR models with default settings
runMDRmodels("/path/to/results")

# Run with more threads and minimal output
runMDRmodels("/path/to/results",
             threads = 32,
             verbose = FALSE)

# Run without saving model fits (save disk space)
runMDRmodels("/path/to/results",
             threads = 16,
             return_fit = FALSE)
} # }