README.md

regnetMC (regnet with OpenMP support)

Regularized Network-Based Variable Selection

Codecov test
coverage R-CMD-check

Network-based regularization has achieved success in variable selection for high-dimensional biological data due to its ability to incorporate correlations among genomic features. This package provides procedures of network-based variable selection for generalized linear models (Ren et al.(2017) and Ren et al.(2019)). Two recent additions are the robust network regularization for the survival response and the network regularization for continuous response. Functions for other regularization methods will be included in the forthcoming upgraded versions.

How to install

install.packages("devtools")
devtools::install_github("jrhub/regnetMC")

Examples

Survival response

Example.1 (Robust Network)

data(SurvExample)
X = rgn.surv$X
Y = rgn.surv$Y
clv = c(1:5) # variable 1 to 5 are clinical variables, we choose not to penalize them here.
out = cv.regnet(X, Y, response="survival", penalty="network", clv=clv, robust=TRUE, verbo = TRUE)
out$lambda
fit = regnet(X, Y, "survival", "network", out$lambda[1,1], out$lambda[1,2], clv=clv, robust=TRUE)  
index = which(rgn.surv$beta[-(1:6)] != 0)  # [-(1:6)] removes the intercept and clinical variables that are not subject to selection.
pos = which(fit$coeff[-(1:6)] != 0)  
tp = length(intersect(index, pos))  
fp = length(pos) - tp  
list(tp=tp, fp=fp)
The cross-validation step can run on multiple cores (OpenMP):
# detect the number of CPU cores on the current host
library("parallel")
ncores = parallel::detectCores(logical=FALSE) # ncores>2 can show significant increases in speed
# parallel CV 
out = cv.regnet(X, Y, response="s", penalty="n", clv=clv, robust=TRUE, ncores=ncores, verbo = TRUE)

Binary response

Example.2 (Network Logistic)

data(LogisticExample)
X = rgn.logi$X
Y = rgn.logi$Y
out = cv.regnet(X, Y, response="binary", penalty="network", folds=5, r = 4.5)  
out$lambda 
fit = regnet(X, Y, "binary", "network", out$lambda[1,1], out$lambda[1,2], r = 4.5)
index = which(rgn.logi$beta[-1] != 0)   # [-1] removes the intercept
pos = which(fit$coeff[-1] != 0)  
tp = length(intersect(index, pos))  
fp = length(pos) - tp  
list(tp=tp, fp=fp)

Continuous response

Example.3 (Network graphs)

data(ContExample)
X = rgn.tcga$X
Y = rgn.tcga$Y
clv = (1:2)
fit = regnet(X, Y, "continuous", "network", rgn.tcga$lamb1, rgn.tcga$lamb2, clv =clv, alpha.i=0.5)
net = plot(fit)
subs = plot(fit, subnetworks = TRUE, vsize=20, labelDist = 3, theta = 5)

News

regnetMC (development version) [2021-3]

regnet (development version) [2020-5]

regnet 0.4.0 [2019-6-7]

Based on users’ feedback, we have

regnet 0.3.0 [2018-5-21]

regnet 0.2.0 [2017-10-14]

Methods

This package provides implementation for methods proposed in

References



jrhub/regnetMC documentation built on Feb. 20, 2024, 5:36 a.m.