decomp_recomp {pbdML}R Documentation

Decompose/Recompose

Description

Exclude the variance contributed by the principal components enumerated in the vector exclude from the data matrix.

Usage

decomp_recomp(x, exclude, center = TRUE, scale = FALSE)

Arguments

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.

Value

A matrix or ddmatrix, matching the same type as the input x.

Author(s)

Drew Schmidt

References

Inspired by a question from Ahmed Moustafa: https://twitter.com/AhmedMoustafa/status/646310686725812224

Examples

## 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)


[Package pbdML version 0.1-0 Index]