pca: Principal component analysis

Description Usage Arguments Value

Description

Performs efficient eigendecomposition of an input covariance matrix based on which principal axes that are wanted. If all axes are wanted, svd is used. RSpectra::eigs_sym is used if only the highest or lowest eigenvalues with corresponding eigenvectors are requested.

Usage

1
pca(cov_mat, axes = 1:data_dim)

Arguments

cov_mat

A covariance matrix.

axes

A vector indicating which principal axes are wanted.

Value

pca returns an S3 object of class "pca". This is a list with the following components:

vectors

A matrix with the chosen principal axes/eigenvectors as rows.

values

A vector of the corresponding eigenvalues


NeymanPearsonFan1/tpca documentation built on June 6, 2019, 7:40 a.m.