理论知识
随机向量的“零均值化”和“空间解相关”是最常用的两个预处理过程,其中“零均值化”比较简单,而“空间解相关”涉及一些矩阵的知识。
设有均值为零的随机信号向量
,其自相关矩阵为
![x](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9dd4e461268c8034f5c8564e155c67a6.gif)
很明显,
是对称矩阵,且是非负定的(所有特征值都大于或等于0)。
![R_x](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4426b0e8fb01536a88c60616a7181d9f.gif)
现在,寻找一个线性变换
对
进行变换,即
,使得
![B](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
![x](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9dd4e461268c8034f5c8564e155c67a6.gif)
![y=Bx](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9c8b423a96a00c8df54a8fb5e1e90cc4.gif)
上式的含义是:y的各分量是不相关的,即
。通常将这个过程称为“空间解相关”、“空间白化”或“球化”。
称为空间解相关矩阵(空间白化矩阵、球化矩阵)。
![E[y_i y_j]=\delta_{ij}](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_b3b63da6510f7d257532071b96c76da9.gif)
![B](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
由
的性质可知,其存在特征值分解:
![R_x](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4426b0e8fb01536a88c60616a7181d9f.gif)
![Q](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_f09564c9ca56850d4cd6b3319e541aee.gif)
![\Sigma](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_025b3f94d79319f2067156076bf05243.gif)
![R_x](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4426b0e8fb01536a88c60616a7181d9f.gif)
令
B=Σ−1/2QT
则有
![R_y = (\Sigma^{-1/2} Q^T)Q \Sigma Q^T (\Sigma^{-1/2} Q^T)^T = I](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_78bcfa365d09d48257e3fda17829e80e.gif)
因此,通过矩阵
线性变换后,
的各个分量变得不相关了。
![B](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
![y](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_415290769594460e2e485922904f345d.gif)
对于
来说,特征值分解和奇异值分解是等价的,而奇异值分解的数值算法比特征值分解的数值算法具有更好的稳定性,因此一般都用奇异值分解来构造空间解相关矩阵
。
![R_x](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4426b0e8fb01536a88c60616a7181d9f.gif)
![B](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
应该注意到,“空间解相关”不能保证各分量信号之间的“独立性”,但它能够简化盲分离算法或改善分离算法的性能。
最为熟知的例子是白噪声。元素
可以是一个时间序列在相继时间点
的值,且在噪声序列中没有时间上得相关性。术语“白”来自于白噪声的能谱在所有频率上是一个常数这一事实,就像含有各种颜色的白光谱一样。白化的本质就是去相关加缩放。
![x_i](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_1ba8aaab47179b3d3e24b0ccea9f4e30.gif)
![i=1,2,...](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_8878cb9e0f12d05b8457be9fa3a4c792.gif)
由上式得到的
解相关矩阵
肯定不是唯一的白化矩阵。容易看到,任何矩阵
(
为正交矩阵)也是白化矩阵。
这是因为对
,下式成立:
![B](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
![UB](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d02262ac7b9cb33f0c3a8c2f9cf6edc.gif)
![U](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_4c614360da93c0a041b22e537de151eb.gif)
![y=UBx](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9033ea915a74ebd7a2d36d6a45dd8bbf.gif)
一个重要的例子是矩阵
。这也是一个白化矩阵,因为它是用正交矩阵
左乘式矩阵
得到的。这个矩阵称为
的逆均方根,并用
表示,因为它来自于均方根概念向矩阵的标准推广。
![Q \Sigma^{-1/2} Q^T](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_3a2839afcc97e885edcccda91797bf97.gif)
![Q](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_f09564c9ca56850d4cd6b3319e541aee.gif)
![B](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_9d5ed678fe57bcca610140957afab571.gif)
![C_x](http://chunqiu.blog.ustc.edu.cn/wp-content/plugins/latex/cache/tex_0ca9b50c4f630610a4851c789b270a9a.gif)
![C_x^{-1/2}](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.