Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

TransMission

Implementation of the TransMission and D-TransMission transfer learning algorithms (He et al., JMLR 2025).

Directory Layout

TransMission/
├── src/
│   ├── transmission_algorithm.R  ← TransMission() and DTransMission()
│   ├── data_generation.R         ← synthetic data generators
│   └── utils.R                   ← lasso_glmnet, CV utilities, evaluation helpers
└── simulation/
    ├── ctrans_simulation.R/.sh   ← Tables 1 & 2 (Gaussian + logistic, vary h)
    ├── ctrans_cov_strength.R/.sh ← Table 1, covariate shift strength grid (h × ρ)
    └── dtrans_simulation.R/.sh   ← Table 1b (D-TransMission vs TransMission)

Quick Start

# Table 1 & 2: vary heterogeneity h
# Args: family K n0 cov_structure cov_shift_strength [num_replicates]
bash simulation/ctrans_simulation.sh
# or: Rscript simulation/ctrans_simulation.R gaussian 4 150 random_covariance 0.3 50

# Table 1, rho grid
bash simulation/ctrans_cov_strength.sh

# Table 1b: D-TransMission
bash simulation/dtrans_simulation.sh

Core API

source("src/utils.R")
source("src/data_generation.R")
source("src/transmission_algorithm.R")

# Generate synthetic data
data <- generate_data(
  hk_strength = 10, K = 4, n0 = 150, n = rep(200, 4),
  p = 500, s = 16, spar = 50,
  family = "gaussian", cov_func = "random_covariance",
  cov_shift_strength = 0.3
)

# TransMission (unconstrained)
result <- TransMission(dataset = data, family = "gaussian",
                       intercept = FALSE, constraint = FALSE, manual_cv = TRUE)

# TransMission (constraint-based selection)
result <- TransMission(dataset = data, family = "gaussian",
                       intercept = FALSE, constraint = TRUE, manual_cv = TRUE)

# D-TransMission
result_d <- DTransMission(dataset = data, family = "gaussian",
                           intercept = FALSE, estimator_type = "scad")

Dependencies

install.packages(c("glmnet", "MASS", "ggplot2", "parallel"))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages