MyNixOS website logo
Description

Joint and Individual Regression.

Implements the JICO algorithm [Wang, P., Wang, H., Li, Q., Shen, D., & Liu, Y. (2022). <arXiv:2209.12388>], which solves the multi-group regression problem. The algorithm decomposes the responses from multiple groups into shared and group-specific components, which are driven by low-rank approximations of joint and individual structures from the covariates respectively. It provides the implementation of the algorithm so solve the iterative continuum regression problem with fixed rank selection, as well as the cross-validation function to perform hyperparameter tuning.

JICO

R package with implementations of the JICO algorithm: https://arxiv.org/abs/2209.12388

How to Install

You can install the package through use devtools:

devtools::install_github("peiyaow/JICO", upgrade_dependencies = FALSE)

Overview

To see the full list of exported functions:

library("JICO")
ls("package:JICO")

A quick overview of some of the key functions:

  • continuum.multigroup.iter: This function iteratively solves the multi-group regression problem using the JICO algorithm

  • cv.continnum.iter: This function performs K-fold cross validations to select the best tuning parameters for JICO.

Toy Example

Generate the data using the PCR setting (section 4.1 in the paper):

library(JICO)

n1 = 50
n2 = 50
n = n1 + n2
p = 200
r = 1
r1 = 1
r2 = 1

alpha = rep(1, r)
alpha1 = rep(1, r1)
alpha2 = rep(1, r2)

set.seed(78)
X1 = MASS::mvrnorm(n1, rep(0, p), diag(p)) # covariates of the first group
X2 = MASS::mvrnorm(n2, rep(0, p), diag(p)) # covariates of the second group
X.list = list(X1, X2)
X = rbind(X1, X2)

q = r
q1 = r1
q2 = r2
V = matrix(svd(X)$v[,1:q], ncol = q)%*%rep(1/sqrt(q), q)
V1 = matrix(svd(X1%*%(diag(p) - V%*%t(V)))$v[,1:q1], ncol = q1)%*%rep(1/sqrt(q1), q1)
V2 = matrix(svd(X2%*%(diag(p) - V%*%t(V)))$v[,1:q2], ncol = q2)%*%rep(1/sqrt(q2), q2)

e1 = rnorm(n1)*0.2
e2 = rnorm(n2)*0.2
Y1 = X1%*%V%*%alpha + X1%*%V1%*%alpha1 + e1 # responses for the first group
Y2 = X2%*%V%*%alpha + X2%*%V2%*%alpha2 + e2 # responses for the second group
Y.list = list(Y1, Y2)

ml.JICO = continuum.multigroup.iter(
  X.list, Y.list, gam=1e12, rankJ=1, rankA=c(1, 1),
  maxiter = 300
)

cv.parameter.set = parameter.set.G_2(
  maxrankA = 1, maxrankJ = 1, gamma = 1e12
) # enumerate the set of tuning parameters

cv.ml.JICO = cv.continnum.iter(
  X.list, Y.list, parameter.set = cv.parameter.set, 
  criteria = "min", nfold = 5, maxiter = 300,
  center.X = F, scale.X = F, center.Y = F, scale.Y = F
) # fit the model and use CV to find the best parameters

# > cv.ml.JICO$parameter
# $rankA
# [1] 1 1
# 
# $rankJ
# [1] 1
# 
# $gam
# [1] 1e+12

Section.

Metadata

Version

0.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows