apply_pca: Apply PCA for Null Space Removal

View source: R/allda.R

apply_pcaR Documentation

Apply PCA for Null Space Removal

Description

Preprocess the data matrix to remove the null space using PCA and retain a number of principal components that explain at least var_retained proportion of variance.

Usage

apply_pca(X, var_retained = 0.95)

Arguments

X

Data matrix of size n x d (n samples, d features).

var_retained

Proportion of variance to retain (default is 0.95).

Value

A list containing:

X_pca

The transformed data matrix after PCA (n x d_pca).

rot

The PCA rotation/loadings matrix (d x d_pca).

fit

The PCA fit object from multivarious::pca.


bbuchsbaum/discursive documentation built on April 14, 2025, 4:57 p.m.