Add PCA embeddings for a SRTProject object

AddPCA(obj, n_comp = 15, Method = c("APCA", "PCA", "WPCA"), seed = 1)

# S3 method for SRTProject
AddPCA(obj, n_comp = 15, Method = c("APCA", "PCA", "WPCA"), seed = 1)

Arguments

obj

a SRTProject object.

n_comp

an optional positive integer, specify the number of features to be extracted.

Method

a string, the method to compute PCA scores. There are three versions to provide: approximated PCA (APCA), PCA, and weighted PCA (WPCA).

seed

a non-negative integer, the random seed for reproducibility.

Value

Return a revised SRTProject object by adding PCA embeddings