| Title: | Whitening Data as Preparation for Blind Source Separation |
|---|---|
| Description: | Whitening is the first step of almost all blind source separation (BSS) methods. A fast implementation of whitening for BSS is implemented to serve as a lightweight dependency for packages providing BSS methods. |
| Authors: | Markus Matilainen [cre, aut]
|
| Maintainer: | Markus Matilainen <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 0.1 |
| Built: | 2026-05-25 07:32:59 UTC |
| Source: | https://github.com/cran/BSSprep |
Whitening is the first step of almost all blind source separation (BSS) methods. A fast implementation of whitening for BSS is implemented to serve as a lightweight dependency for packages providing BSS methods.
| Package: | BSSprep |
| Type: | Package |
| Version: | 0.1 |
| Date: | 2021-03-25 |
| License: | GPL (>= 2) |
This package contains the single function BSSprep for whitening multivariate data as a preprocessing step for blind source separation (BSS). The package is meant as a fast and lightweight dependency for packages providing BSS methods as whitening is almost always the first step.
Markus Matilainen, Klaus Nordhausen
Maintainer: Markus Matilainen <[email protected]>
A function for data whitening.
BSSprep(X)BSSprep(X)
X |
A numeric matrix. Missing values are not allowed. |
A -variate with observations is whitened, i.e. , for ,
where is the sample covariance matrix of .
This is often need as a preprocessing step like in almost all blind source separation (BSS) methods. The function is implemented using C++ and returns the whitened data matrix as well as the ingredients to back transform.
A list containing the following components:
Y |
The whitened data matrix. |
X.C |
The mean-centered data matrix. |
COV.sqrt.i |
The inverse square root of the covariance matrix of X. |
MEAN |
Mean vector of X. |
Markus Matilainen, Klaus Nordhausen
n <- 100 X <- matrix(rnorm(10*n) - 1, nrow = n, ncol = 10) res1 <- BSSprep(X) res1$Y # The whitened matrix colMeans(res1$Y) # should be close to zero cov(res1$Y) # should be close to the identity matrix res1$MEAN # Should hover around -1 for all 10 columnsn <- 100 X <- matrix(rnorm(10*n) - 1, nrow = n, ncol = 10) res1 <- BSSprep(X) res1$Y # The whitened matrix colMeans(res1$Y) # should be close to zero cov(res1$Y) # should be close to the identity matrix res1$MEAN # Should hover around -1 for all 10 columns