Package 'BSSprep'

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] , Klaus Nordhausen [aut]
Maintainer: Markus Matilainen <[email protected]>
License: GPL (>= 2)
Version: 0.1
Built: 2024-10-31 06:23:25 UTC
Source: CRAN

Help Index


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.

Details

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.

Author(s)

Markus Matilainen, Klaus Nordhausen

Maintainer: Markus Matilainen <[email protected]>


Whitening of Multivariate Data

Description

A function for data whitening.

Usage

BSSprep(X)

Arguments

X

A numeric matrix. Missing values are not allowed.

Details

A pp-variate Y{\bf Y} with TT observations is whitened, i.e. Y=S1/2(Xt1Tt=1TXt){\bf Y}={\bf S}^{-1/2}({\bf X}_t - \frac{1}{T}\sum_{t=1}^T {\bf X}_{t}), for t=1,,Tt = 1, \ldots, T, where S{\bf S} is the sample covariance matrix of X{\bf X}.

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.

Value

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.

Author(s)

Markus Matilainen, Klaus Nordhausen

Examples

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 columns