Information-Theoretic Metric Learning (ITML) for Single-Cell Data
Source:R/scLearn_model_learning.R
      runITML.RdPerforms stable ITML metric learning for single-cell RNA-seq data with multiple fallback mechanisms to ensure numerical stability. Learns a Mahalanobis distance metric using relative distance constraints with information-theoretic regularization.
Usage
runITML(
  high_varGenes,
  expression_profile,
  sample_information,
  gamma = 0.1,
  max_iter = 50,
  epsilon = 1e-06,
  seed = 1,
  verbose = TRUE
)Arguments
- high_varGenes
- Character vector of high-variance gene names 
- expression_profile
- Numeric matrix (genes x cells) 
- sample_information
- Named vector of cell type labels 
- gamma
- Slack parameter controlling constraint strictness (default: 0.1) 
- max_iter
- Maximum number of optimization iterations (default: 50) 
- epsilon
- Convergence threshold for early stopping (default: 1e-6) 
- seed
- Random seed for reproducibility (default: 1) 
- verbose
- Whether to print progress messages (default: TRUE) 
Value
A list containing:
- expression_profile_trans: Transformed data matrix (genes x cells) 
- expression_profile_origin: Original expression matrix 
- trans_matrix: Learned transformation matrix 
- sample_information: Input cell labels 
- convergence: Convergence status information 
Examples
if (FALSE) { # \dontrun{
# Example usage:
data("scRNA_example")
itml_result <- runITML(
  high_varGenes = scRNA_example$hv_genes,
  expression_profile = scRNA_example$expr_mat,
  sample_information = scRNA_example$cell_types
)
} # }