Optimized Cross-Condition Multi-Task Learning Model Training
Source:R/25-DEGAS_Screen.R
runCCMTL.optimized.RdAn optimized wrapper function for training cross-condition multi-task learning (CCMTL) models in the DEGAS framework. This function handles the complete training pipeline including data preparation, model configuration, and execution with enhanced performance and error handling.
Usage
runCCMTL.optimized(
scExp,
scLab,
patExp,
patLab,
tmpDir,
model_type,
architecture,
FFdepth,
DEGAS.seed,
force_rewrite = FALSE,
verbose = TRUE
)Arguments
- scExp
A matrix or data frame containing single-cell expression data for model training.
- scLab
A matrix containing single-cell labels corresponding to the expression data.
- patExp
A matrix or data frame containing patient-level expression data for multi-task learning.
- patLab
A matrix containing patient-level labels corresponding to the patient expression data.
- tmpDir
Character string specifying the temporary directory path for storing intermediate files and model outputs.
- model_type
Character string specifying the type of model to train. Should match available DEGAS model types.
- architecture
Character string specifying the neural network architecture. One of: "DenseNet", "Standard".
- FFdepth
Integer specifying the number of layers in the feed-forward network architecture.
- DEGAS.seed
Integer specifying the random seed for reproducible model training.
- force_rewrite
Logical indicating whether to force rewriting of input files even if they already exist. Default: FALSE.
Details
Workflow:
File Management: Efficient handling of temporary directories and input files with optional forced rewriting
Architecture Configuration: Supports multiple neural network architectures (DenseNet, Standard) with customizable depth
Python Environment: Validates Python availability and executes training scripts with proper error handling
Model Training: Executes the DEGAS training process with specified hyperparameters and architecture choices
Note
This function requires a properly configured Python environment with DEGAS
dependencies installed. The temporary directory (tmpDir) should have
sufficient disk space for model files and intermediate data.
References
Johnson TS, Yu CY, Huang Z, Xu S, Wang T, Dong C, et al. Diagnostic Evidence GAuge of Single cells (DEGAS): a flexible deep transfer learning framework for prioritizing cells in relation to disease. Genome Med. 2022 Feb 1;14(1):11.
See also
runCCMTLBag.optimized() for bootstrap aggregated model training,
Other DEGAS:
DoDEGAS(),
LabelBinaryCells(),
LabelContinuousCells(),
LabelSurvivalCells(),
Vec2sparse(),
predClassBag.optimized(),
readOutputFiles.optimized(),
runCCMTLBag.optimized(),
writeInputFiles.optimized()