| bpFitCPCA {scPCA} | R Documentation |
Given target and background dataframes or matrices, cPCA
will perform contrastive principal component analysis (cPCA) of the target
data for a given number of eigenvectors and a vector of real valued
contrast parameters. This is identical to the implementation of cPCA
method by Abid et al. Abid et al. (2018).
Analogous to fitCPCA, but replaces all lapply calls by
bplapply.
bpFitCPCA( target, center, scale, c_contrasts, contrasts, n_eigen, n_medoids, eigdecomp_tol, eigdecomp_iter )
target |
The target (experimental) data set, in a standard format such
as a |
center |
A |
scale |
A |
c_contrasts |
A |
contrasts |
A |
n_eigen |
A |
n_medoids |
A |
eigdecomp_tol |
A |
eigdecomp_iter |
A |
A list of lists containing the cPCA results for each contrastive parameter deemed to be a medoid.
rotation - the list of matrices of variable loadings
x - the list of rotated data, centred and scaled if requested, multiplied by the rotation matrix
contrast - the list of contrastive parameters
penalty - set to zero, since loadings are not penalized in cPCA
Abid A, Zhang MJ, Bagaria VK, Zou J (2018). “Exploring patterns enriched in a dataset with contrastive principal component analysis.” Nature communications, 9.