sOG: sparse Orthogonal to Groups analysis

Description Usage Arguments Details Value References Examples

View source: R/SOG.R

Description

Perform sparse matrix decomposition under group constraints.

Usage

1
2
3
sOG(X = warning("X missing"), z = stop("z missing"),
  t_val = stop("t_val missing"), K = max(2, round(NCOL(X)/100)),
  rescale = T, control = control_sOG())

Arguments

X

n x p data matrix to preprocess.

z

n x 1 vector with group information.

t_val

penalty parameter. Must be a positive number. Control the strength of the l-1 penalty.

K

approximation rank. The defaul is max(2, round(NCOL(X)/100))

control

Control parameters for the fitting process. A list as returned by control_sOG.

rescaled

Should the matrix X be rescaled? Default is TRUE.

Details

The function performs a sparse matrix decomposition of the input matrix X with constraints on the left singular vectors and the group variable z. The output is a matrix U of basis and a matrix S of scores such that \tilde X = S * U^T, where \tilde X is the rank-K approximation of X

Value

References

Aliverti, Lum, Johndrow and Dunson (2018). Removing the influence of a group variable in high-dimensional predictive modelling (https://arxiv.org/abs/1810.08255).

Examples

1
2
3
4
5
6
7
8
9
k.rid = 10
n = 5000
p = 200
W = matrix(rnorm(p*k.rid), k.rid)
S = matrix(rnorm(n*k.rid), n)
z = sample(rep(0:1, each=n/2))
lambda = rnorm( k.rid, mean = 0, sd = 1)
A = jitter( (S - lambda * z ) %*% W)
res = sOG(X = A, z = z, t_val = 10, K = 30)

emanuelealiverti/SOG documentation built on Nov. 20, 2019, 12:45 a.m.