decomp_recomp {pbdML} | R Documentation |
Exclude the variance contributed by the principal components
enumerated in the vector exclude
from the data matrix.
decomp_recomp(x, exclude, center = TRUE, scale = FALSE)
x |
A matrix or ddmatrix of numeric values. |
exclude |
A vector of positive integer values which are the principal components whose variance contribution should be removed. |
center |
Logical; determines if the matrix should be centered first. |
scale |
Logical; determines if the matrix should be scaled first. |
A matrix or ddmatrix, matching the same type as the input x
.
Drew Schmidt
Inspired by a question from Ahmed Moustafa: https://twitter.com/AhmedMoustafa/status/646310686725812224
## Not run: ## TODO add mpirun message boilerplate library(pbdDMAT) init.grid() x <- ddmatrix("rnorm", nrow=100, ncol=10, bldim=c(2,2)) # Remove the contribution of PC 1's variance decomp_recomp(x, 1) finalize() ## End(Not run)