码迷,mamicode.com
首页 > 其他好文 > 详细

Whitening

时间:2014-09-14 17:53:27      阅读:301      评论:0      收藏:0      [点我收藏+]

标签:des   style   http   io   os   ar   strong   for   art   

The goal of whitening is to make the input less redundant; more formally, our desiderata are that our learning algorithms sees a training input where (i) the features are less correlated with each other, and (ii) the features all have the same variance.

 

example

How can we make our input features uncorrelated with each other? We had already done this when computing bubuko.com,布布扣. Repeating our previous figure, our plot for bubuko.com,布布扣 was:

bubuko.com,布布扣

The covariance matrix of this data is given by:

bubuko.com,布布扣

 

It is no accident that the diagonal values are bubuko.com,布布扣 and bubuko.com,布布扣. Further, the off-diagonal entries are zero; thus, bubuko.com,布布扣 and bubuko.com,布布扣are uncorrelated, satisfying one of our desiderata for whitened data (that the features be less correlated).

To make each of our input features have unit variance, we can simply rescale each feature bubuko.com,布布扣 by bubuko.com,布布扣. Concretely, we define our whitened data bubuko.com,布布扣 as follows:

bubuko.com,布布扣

Plotting bubuko.com,布布扣, we get:

bubuko.com,布布扣

This data now has covariance equal to the identity matrix bubuko.com,布布扣. We say that bubuko.com,布布扣 is our PCA whitened version of the data: The different components of bubuko.com,布布扣 are uncorrelated and have unit variance.

 

ZCA Whitening

 

 

Finally, it turns out that this way of getting the data to have covariance identity bubuko.com,布布扣 isn‘t unique. Concretely, if bubuko.com,布布扣 is any orthogonal matrix, so that it satisfies bubuko.com,布布扣 (less formally, if bubuko.com,布布扣 is a rotation/reflection matrix), then bubuko.com,布布扣 will also have identity covariance. In ZCA whitening, we choose bubuko.com,布布扣. We define

bubuko.com,布布扣

Plotting bubuko.com,布布扣, we get:

bubuko.com,布布扣

 

It can be shown that out of all possible choices for bubuko.com,布布扣, this choice of rotation causes bubuko.com,布布扣 to be as close as possible to the original input data bubuko.com,布布扣.

When using ZCA whitening (unlike PCA whitening), we usually keep all bubuko.com,布布扣 dimensions of the data, and do not try to reduce its dimension.

 

Regularizaton

 

When implementing PCA whitening or ZCA whitening in practice, sometimes some of the eigenvalues bubuko.com,布布扣 will be numerically close to 0, and thus the scaling step where we divide by bubuko.com,布布扣 would involve dividing by a value close to zero; this may cause the data to blow up (take on large values) or otherwise be numerically unstable. In practice, we therefore implement this scaling step using a small amount of regularization, and add a small constant bubuko.com,布布扣 to the eigenvalues before taking their square root and inverse:

bubuko.com,布布扣

When bubuko.com,布布扣 takes values around bubuko.com,布布扣, a value of bubuko.com,布布扣 might be typical.

 

For the case of images, adding bubuko.com,布布扣 here also has the effect of slightly smoothing (or low-pass filtering) the input image. This also has a desirable effect of removing aliasing artifacts caused by the way pixels are laid out in an image, and can improve the features learned (details are beyond the scope of these notes).

ZCA whitening is a form of pre-processing of the data that maps it from bubuko.com,布布扣 to bubuko.com,布布扣. It turns out that this is also a rough model of how the biological eye (the retina) processes images. Specifically, as your eye perceives images, most adjacent "pixels" in your eye will perceive very similar values, since adjacent parts of an image tend to be highly correlated in intensity. It is thus wasteful for your eye to have to transmit every pixel separately (via your optic nerve) to your brain. Instead, your retina performs a decorrelation operation (this is done via retinal neurons that compute a function called "on center, off surround/off center, on surround") which is similar to that performed by ZCA. This results in a less redundant representation of the input image, which is then transmitted to your brain.

Whitening

标签:des   style   http   io   os   ar   strong   for   art   

原文地址:http://www.cnblogs.com/sprint1989/p/3971244.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!