View source: R/Dimesion_reduction_functions.R
pca_reduction | R Documentation |
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
pca_reduction(df, center = TRUE, scale = TRUE, sign_align_params = NULL)
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). |
a list with two elements : pca_obj - PCA object, time_index - dates vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.