Parses parquet file names in the matrix directory and generates a tibble mapping input files to output paths. Handles multiple analysis modes including standard, cross-test, Leave-One-Out (LOO), and Multi-Drug Resistance (MDR).
createMLinputList(
path,
stratify_by = NULL,
LOO = FALSE,
MDR = FALSE,
cross_test = FALSE
)Character scalar. Base directory path containing matrix subdirectories.
Character scalar or NULL. Stratification method: "country",
"year", or NULL.
Logical. Whether to perform Leave-One-Out analysis. Requires stratify_by.
Logical. Whether to perform Multi-Drug Resistance analysis.
Logical. Whether to perform cross-testing between groups.
A tibble with columns:
Path to reference/training parquet file
Path to test parquet file (NA for non-cross-test)
Prefix for output files
Directory containing matrix files
Directory for performance output
Directory for top features output
Directory for model objects
Directory for predictions
if (FALSE) { # \dontrun{
# Standard ML input list
inputs <- createMLinputList("/path/to/results")
# Cross-test with year stratification
inputs_ct <- createMLinputList("/path/to/results",
stratify_by = "year",
cross_test = TRUE)
# MDR analysis
inputs_mdr <- createMLinputList("/path/to/results", MDR = TRUE)
} # }