数据预处理之白化-Whitening
2017-09-26 21:55
423 查看
理论知识
随机向量的“零均值化”和“空间解相关”是最常用的两个预处理过程,其中“零均值化”比较简单,而“空间解相关”涉及一些矩阵的知识。设有均值为零的随机信号向量
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9dd4e461268c8034f5c8564e155c67a6.gif)
,其自相关矩阵为
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_54b9eca964432c02e134e59bf33c1108.gif)
很明显,
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4426b0e8fb01536a88c60616a7181d9f.gif)
是对称矩阵,且是非负定的(所有特征值都大于或等于0)。
现在,寻找一个线性变换
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
对
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9dd4e461268c8034f5c8564e155c67a6.gif)
进行变换,即
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9c8b423a96a00c8df54a8fb5e1e90cc4.gif)
,使得
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_937b2552f6c56fb2d93d63fe8a31ee52.gif)
上式的含义是:y的各分量是不相关的,即
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_b3b63da6510f7d257532071b96c76da9.gif)
。通常将这个过程称为“空间解相关”、“空间白化”或“球化”。
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
称为空间解相关矩阵(空间白化矩阵、球化矩阵)。
由
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4426b0e8fb01536a88c60616a7181d9f.gif)
的性质可知,其存在特征值分解:
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_7058ce52119ab4d1ce597be4bfff0165.gif)
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_f09564c9ca56850d4cd6b3319e541aee.gif)
是正交矩阵,
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_025b3f94d79319f2067156076bf05243.gif)
是对角矩阵,其对角元素是
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4426b0e8fb01536a88c60616a7181d9f.gif)
特征值。
令
B=Σ−1/2QT
则有
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_78bcfa365d09d48257e3fda17829e80e.gif)
因此,通过矩阵
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
线性变换后,
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_415290769594460e2e485922904f345d.gif)
的各个分量变得不相关了。
对于
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4426b0e8fb01536a88c60616a7181d9f.gif)
来说,特征值分解和奇异值分解是等价的,而奇异值分解的数值算法比特征值分解的数值算法具有更好的稳定性,因此一般都用奇异值分解来构造空间解相关矩阵
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
。
应该注意到,“空间解相关”不能保证各分量信号之间的“独立性”,但它能够简化盲分离算法或改善分离算法的性能。
最为熟知的例子是白噪声。元素
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_1ba8aaab47179b3d3e24b0ccea9f4e30.gif)
可以是一个时间序列在相继时间点
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_8878cb9e0f12d05b8457be9fa3a4c792.gif)
的值,且在噪声序列中没有时间上得相关性。术语“白”来自于白噪声的能谱在所有频率上是一个常数这一事实,就像含有各种颜色的白光谱一样。白化的本质就是去相关加缩放。
由上式得到的解相关矩阵
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
肯定不是唯一的白化矩阵。容易看到,任何矩阵
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d02262ac7b9cb33f0c3a8c2f9cf6edc.gif)
(
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4c614360da93c0a041b22e537de151eb.gif)
为正交矩阵)也是白化矩阵。这是因为对
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9033ea915a74ebd7a2d36d6a45dd8bbf.gif)
,下式成立:
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_33b1704b6d28a8bd2e37bf0249f00f74.gif)
一个重要的例子是矩阵
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_3a2839afcc97e885edcccda91797bf97.gif)
。这也是一个白化矩阵,因为它是用正交矩阵
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_f09564c9ca56850d4cd6b3319e541aee.gif)
左乘式矩阵
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
得到的。这个矩阵称为
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_0ca9b50c4f630610a4851c789b270a9a.gif)
的逆均方根,并用
![](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_c025661588388772037f3a9996fb2f7d.gif)
表示,因为它来自于均方根概念向矩阵的标准推广。
理论知识参考:《盲信号处理》,《Independent Component Analysis》
Matlab代码实现
C = cov(patches); M = mean(patches); [V,D] = eig(C); P = V * diag(sqrt(1./(diag(D) + 0.1))) * V'; patches = bsxfun(@minus, patches, M) * P;代码中patches表示矩阵或图像(灰度),代码中用到的函数均为matlab built-in function.
参考: 数据白化预处理
相关文章推荐
- (Python实现)数据PCA降维白化和L2归一化-深度学习实践常用数据预处理
- 数据预处理:PCA,SVD,whitening,normalization
- 数据预处理的几个方法:白化、去均值、归一化、PCA
- 神经网络基本原理-4.3数据预处理(零中心化+归一化+PCA+白化)
- 数据白化预处理
- Python数据处理 PCA/ZCA 白化(UFLDL教程:Exercise:PCA_in_2D&PCA_and_Whitening)
- 数据白化预处理
- 数据预处理
- python数据预处理练习
- 数据预处理:标准化(Standardization)
- 数据预处理sklearn.preprocessing中,fit_transform()和transform()的区别?
- 机器学习数据预处理方法与技巧系统讲解
- EEGLAB数据分析:预处理与后续处理
- 文本挖掘—搜狗语料库数据预处理
- 用Python进行数据挖掘(数据预处理)
- weka---数据预处理
- 数据开发常用的几种数据预处理和数据整理方法
- Kaggel House Price 数据预处理及其可视化
- 数据预处理和weka.filters的使用
- spark mllib 的数据预处理