pca: Principal component analysis

Description Usage Arguments Value

View source: R/tpca_helpers.R

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


Tveten/tailorPCA documentation built on June 13, 2021, 9:10 p.m.