ComputeSCA: The function computes the solution of a special configuration...

View source: R/ComputeSCA.R

ComputeSCAR Documentation

The function computes the solution of a special configuration of Sparce PCA (called SParse Variable PCA; SVPCA). Instead of imposing zeros on individual elements of a loading matrix, all elements of a certain role (i.e. variables) are imposed to zero

Description

The function computes the solution of a special configuration of Sparce PCA (called SParse Variable PCA; SVPCA). Instead of imposing zeros on individual elements of a loading matrix, all elements of a certain role (i.e. variables) are imposed to zero

Usage

ComputeSCA(
  data,
  r,
  n_sparvar,
  rational = 1,
  num_starts = 10,
  MAXITER = 1000,
  stop_value = 0.001
)

Arguments

data

the orginal dataset on which SVPCA operates

r

number of components

n_sparvar

number of variables that have all zero loadings

rational

whether using rational starts (1, the default value) or random starts (0). The number of rational starts is fixed at 1. Otherwise, the number of starts is given by num_starts.

num_starts

the number of random starts used when rational == 0. The default value is 10

MAXITER

the maximum number of iterations. The default value is 1000

stop_value

the convergence criteria. The default value if 1e-3

Value

a list that contains three elements: the total loss value, the score matrices as well as the loading matrices

Examples

ncluster <- 3
nnoisevar <- 100
ComputeSCA(dataset, n.cluster, n.noisevar)

syuanuvt/CKM documentation built on Dec. 1, 2022, 9:06 p.m.