Whitening transformation
A whitening transformation is a decorrelation transformation that transforms an arbitrary set of variables having a known covariance matrix into a set of new variables whose covariance is the identity matrix (meaning that they are uncorrelated and all have variance 1).
The transformation is called "whitening" because it changes the input vector into a white noise vector. It differs from a general decorrelation transformation in that the latter only makes the covariances equal to zero, so that the correlation matrix may be any diagonal matrix.
The inverse coloring transformation transforms a vector of uncorrelated variables (a white random vector) into a vector
with a specified covariance matrix.
Definition
Suppose is a random (column) vector with covariance matrix
and mean
. One way of whitening
means multiplying by
(when
is not singular). This is called Mahalanobis or ZCA whitening. However, any other whitening matrix
satisfying the condition
is also an admissible whitening transformation (Kessy et al. 2015).
The matrix can be written as the expected value of the outer product of
with itself, namely:
When is symmetric and positive definite (and therefore not singular), it has a positive definite symmetric square root
, such that
. Since
is positive definite,
is invertible, and the vector
has covariance matrix:
and is therefore a white random vector.
If is singular (and hence not positive definite), then
is not invertible, and it is impossible to map
to a white vector with the same number of components. In that case the vector
can still be mapped to a smaller white vector
with
elements, where
is the number of non-zero eigenvalues of
.
Whitening a data matrix
Applying many statistical methods, such as several of those in independent component analysis, to observed data matrices require an initial step of pre-whitening. Suppose is an observed data matrix whose
rows, denoted by
, correspond to realizations of
-variate random vectors that are typically assumed to be independent and identically distributed (i.i.d.). Pre-whitening
to the matrix
is akin then to applying a whitening transformation to its rows by first
- centering the
's with respect to the columns of
and then
- sphericizing the centered data matrix so that its sample covariance is the (
)-dimensional identity matrix
.
The following describes those two steps in detail. Note here that the data matrix is often defined so that its columns correspond to realizations of
-variate random vectors: in this case, these steps will apply to the transpose
.
- To center
, define
![x_{ij}^{\ast} := x_{ij} - \frac{1}{n} \sum_{i=1}^n x_{ij} \quad \text{for} \quad i=1,\ldots,n \quad \text{and} \quad j=1,\ldots,m](/w/images/math/2/2/8/22812e493cc9d4c3f2a9e13cc6fd7ea4.png)
- with the matrix
denoting the centered version of
. The result here being, of course, that each column of
has a sample mean equaling zero.
- The matrix
is then sphericized into the matrix
whose sample covariance is zero. One common way to perform sphericizing is using eigenvalue decomposition to express the sample covariance of
as
![\frac{1}{n} (\mathbf{X}^{\ast})^{\prime} \mathbf{X}^{\ast} = \mathbf{E} \mathbf{D} \mathbf{E}^{\prime}](/w/images/math/5/f/4/5f452350da9a3b7aeb43fbbdc0edd673.png)
- where
is the matrix of eigenvectors and
is the diagonal matrix of eigenvalues. Then,
is defined
, which ensures that the sample covariance of
is
.
See also
References
External links
- http://courses.media.mit.edu/2010fall/mas622j/whiten.pdf
- The ZCA whitening transformation. Appendix A of Learning Multiple Layers of Features from Tiny Images by A. Krizhevsky.
- A. Kessy, A. Lewin, and K. Strimmer 2015. Optimal whitening and decorrelation. arXiv:1512.00809.