preprocess_pca: Preprocess the input data by principal component analysis...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/preprocess_pca.R

Description

The data is denoised and the missing values are imputed by using the top r eigenmatrices. After apply SVD on the centered and/or scaled data, the top r eigenmatrices are constructed where is r < min(n,m).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
preprocess_pca(
  dat,
  r = NULL,
  method = c("em", "nipals"),
  center.dat = TRUE,
  scale.dat = FALSE,
  verbose = FALSE,
  seed = NULL,
  ...
)

Arguments

dat

a time-series data matrix with m biomarkers as rows, over n time points (columns).

r

the number of PCs or eigenmatrices to retain.

method

a method to perform singular-value decomposition when a dataset has missing values. See below for the explanation.

center.dat

a logical specifying to center the input and denoised data. By default, TRUE.

scale.dat

a logical specifying to scale the input and denoised data. By default, FALSE.

verbose

a logical specifying to print the computational progress. By default, FALSE.

seed

a seed for the random number generator.

...

optional arguments.

Details

To impute missing values with PCA/SVD, two approximation methods are provided. For method="nipals", a Non-linear Iterative Partial Least Squares (NIPALS) algorithm is used from nipals in the mixOmics package. For method="em", a low-rank SVD approximation by the EM algorithm is used from imputed.svd in the bcv package.

Value

preprocess_pca returns a matrix of imputed and/or denoised data.

Author(s)

Neo Christopher Chung nchchung@gmail.com

References

Troyanskaya, O., Cantor, M., Sherlock, G., Brown, P., Hastie, T., Tibshirani, R., Botstein, D. and Altman, R.B. (2001). Missing value estimation methods for DNA microarrays. Bioinformatics 17(6), 520–525.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data(cys_optm)
meta <- cys_optm[,1:4]
optm <- log(cys_optm[meta$Select,5:10])
optm <- t(scale(t(optm), scale=TRUE, center=TRUE))
days <- as.numeric(colnames(optm))

preprocessed_optm <- preprocess_pca(optm, timepoints = days, r=3, method=c("nipals","em"))

## End(Not run)

UCLA-BD2K/CV.Signature.TCP documentation built on May 15, 2020, 11:27 p.m.