resetViaPCA {RESET}R Documentation

Reconstruction Set Test (RESET) via PCA

Description

Wrapper around the reset method that uses the projection of X onto the top num.pcs principal components as X.test. This PC projection is computed using a randomized reduced rank SVD as implemented by randomSVD.

Usage

resetViaPCA(X, center=TRUE, scale=FALSE, num.pcs=2, pca.buff=2, pca.q=1, var.sets, k=2, 
      random.threshold, k.buff=0, q=0, test.dist="normal", norm.type="2", per.var=FALSE)

Arguments

X

See description in reset

center

Flag which controls whether the values in X are mean centered. Note that if center is set to true, centering is performed on the entire X matrix prior to calling randomSVD, which may have significant performance and memory implications of X is large and/or sparse. If center is false, then X will be projected onto the uncentered PCs and center.X and center.X.test will be set to TRUE in the call to reset.

scale

Flag which controls whether the values in X are are scaled to have variance 1. Note that if scale is set to true, scaling is performed on the entire X matrix prior to calling randomSVD, which may have significant performance and memory implications of X is large and/or sparse.

num.pcs

Number of principal components used for computing the projection of X.

pca.buff

Number of extra dimensions used when calling randomSVD to compute the PCs. See k.buff parameter for randomSVD function.

pca.q

Number of power iterations used when calling randomSVD to compute the PCs. See q parameter for randomSVD function.

var.sets

See description in reset

k

See description in reset

random.threshold

See description in reset

k.buff

See description in reset

q

See description in reset

test.dist

See description in reset

norm.type

See description in reset

per.var

See description in reset

Value

A list with the following elements:

See Also

reset,createVarSetCollection,randomColumnSpace

Examples

  # Create a collection of 5 variable sets each of size 10
  var.sets = list(set1=1:10, 
                  set2=11:20,
                  set3=21:30,
                  set4=31:40,
                  set5=41:50)                  

  # Simulate a 100-by-100 matrix of random Poisson data
  X = matrix(rpois(10000, lambda=1), nrow=100)

  # Inflate first 10 rows for first 10 variables, i.e., the first
  # 10 samples should have elevated scores for the first variable set
  X[1:10,1:10] = rpois(100, lambda=5)

  # Execute RESET when reconstruction measured on top 10 PCs 
  # with mean centering performed before computing PCs
  resetViaPCA(X, num.pcs=10, var.sets=var.sets, k=2, random.threshold=10)
  
  # Execute RESET when reconstruction measured on top 10 
  # uncentered PCs with centering performed as needed inside reset()
  resetViaPCA(X, center=FALSE, num.pcs=10, var.sets=var.sets, k=2, random.threshold=10)

[Package RESET version 1.0.0 Index]