ggcsvd: Groups sparse Generalized SVD of a matrix

Description Usage Arguments Value Author(s) Examples

View source: R/ggcsvd.R

Description

Groups sparse Generalized SVD of a matrix

Usage

1
2
3
4
ggcsvd(X, R = 2, au = rep(sqrt(nrow(X)), R), av = rep(sqrt(ncol(X)),
  R), Gu = seq(NROW(X)), Gv = seq(NCOL(X)), itermax.pi = 1000,
  itermax.pocs = 1000, eps.pi = 1e-16, eps.pocs = 1e-16,
  init = "svd", order_sv = TRUE)

Arguments

X

a (data) matrix;

R

the desired rank of the singular decomposition;

au

The radiuses (>0) of the $L_1$ ball for each left vector. Default to the maximum possible radius, such that the result is the same as the result of a regular SVD.

av

The radiuses (>0) of the $L_1$ balls for each right vector. Default to the maximum possible radius, such that the result is the same as the result of a regular SVD.

Gu

a vector describing the groups for the lines.

Gv

a vector describing the groups for the columns.

itermax.pi

The maximum number of iterations for the power iteration.

itermax.pocs

The maximum number of iterations for POCS.

eps.pi

Precision for the power iteration.

eps.pocs

Precision for POCS.

init

How to initialize the algorithm. Either "svd" (default) or "rand" to intialize with, respectively, the results of a regular SVD or random vectors.

order_sv

Boolean. Should the singular values be artificially ordered. Default to TRUE.

Value

Pseudo-singular vectors (U and V) and values (D), and the number of iterations.

Author(s)

Vincent Guillemot

Examples

1
2
3
X <- matrix(rnorm(20), 5, 4)
ggcsvd(X) # By default, no sparsity constraint is imposed on the decomposition
svd(X) # Should give roughly the same results

vguillemot/sparseMCA documentation built on Nov. 5, 2019, 12:02 p.m.