pca_reduction: PCA reduction

View source: R/Dimesion_reduction_functions.R

pca_reductionR Documentation

PCA reduction

Description

This function reduces dimension based on PCA method The function takes a data matrix and returns the first n_comps components of PCA transformation. If the data matrix has a time index the result is aligned along the index

Usage

pca_reduction(df, center = TRUE, scale = TRUE, sign_align_params = NULL)

Arguments

df

dataframe

center

boolean indicator

scale

boolean indicator

sign_align_params

(optional) a list of alignment parameters. The first element in the list is the aligning (axis) variable, the value is either character (variable's name) or numeric (variable's position index). The second element if(supplied) is boolean indicator alignment direction (True means positive direction).

Value

a list with two elements : pca_obj - PCA object, time_index - dates vector


MichaelGurkov/GaRPackg documentation built on June 24, 2024, 6:50 a.m.