custom_pca: A Custom PCA Function

Description Usage Arguments Value

View source: R/custom_pca.R

Description

A custom PCA function that does PCA on train data and applies the results to test. Returns first 'n' PCs of train and test results in a list.

Usage

1
custom_pca(train, test, n)

Arguments

train

training data that PCA model will be calculated on

test

test data for applying the PCA results on to.

n

indicates the wanted number of Principal Components to be returned

Value

A list of first n principle components of train and test data, respectively.


canhakan/canhakan1 documentation built on Dec. 19, 2021, 1:48 p.m.