slide_givenS: Fits SLIDE model for X using the pre-specified structure S.

Description Usage Arguments Value Examples

View source: R/Algorithm2.R

Description

Fits SLIDE model for X using the pre-specified structure S.

Usage

1
2
3
4
5
6
7
8
9
slide_givenS(
  X,
  pvec,
  S,
  Ustart = NULL,
  eps = 1e-06,
  k_max = 1000,
  standardized = F
)

Arguments

X

A n x p concatenated data matrix of views X_1,...,X_d.

pvec

A vector of values p_1,....,p_d corresponding to the number of measurements within each view.

S

A binary matrix with nonzero columns of size d x r.

Ustart

An n X r optional starting value for U, if not supplied the first r left singular vectors of X are used.

eps

A convergence tolerance criterion, the default value is 1e-6.

k_max

A maximal number of allowable iterations, the default values is 1000.

standardized

A logical indicator of whether X is centered and standardized. The default value is FALSE and the standardization is performed within the function.

Value

A list with the elements

U

A n x r score matrix for the SLIDE model.

V

A p x r loadings matrix for the SLIDE model with sparsity pattern according to S.

error

Tolerance value at convergence.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
n = 100
p1 = 25
p2 = 25
data = generateModel1(n = n, pvec = c(p1, p2))

# Specify binary structure
S = matrix(c(1,1,0,1,0,1),nrow = 2, ncol = 3)

# Unstandardized
fit_slide = slide_givenS(data$X, pvec = c(p1,p2), S = S)

# Standardized
out = standardizeX(data$X, pvec = c(p1,p2))
fit_slide = slide_givenS(out$X, pvec = c(p1,p2), S = S, standardized = TRUE)

irinagain/SLIDE documentation built on Aug. 14, 2021, 2:56 p.m.