Covariance Matrix 协方差矩阵

Covariance Matrix

All of the  covariances  c(i,j) can be collected together into a  covariance matrix  C: 

This matrix provides us with a way to measure distance that is invariant to linear transformations of the data. Suppose that we start with a d-dimensional feature vector x that has a mean vector mx and a covariance matrix Cx. If we use the d-by-d matrix A to transform x into y through 

y = A  x ,

it is not hard to show that the mean vector for y is given by 

m y = A  m x,

and the covariance matrix for y is given by 

C y = A C x A' .

Suppose now that we want to measure the distance from x to mx, or from y to my. We could, of course, use the Euclidean norm, but it would be very unusual if the Euclidean distance from x to mx turned out to be the same as the Euclidean distance from y to my. (Geometrically, that would happen only if A happened to correspond to a rotation or a reflection, which is not very interesting.) What we want to do is to normalize the distance, much like we did when we defined the standardized distance for a single feature. The question is: What is the matrix generalization of the scalar expression 

The answer turns out to be 

 .

If you know some linear algebra, you should be able to prove that this expression is invariant to any nonsingular linear transformation. That is, if you substitute y = A and use the formulas above for my and Cy, you will get the very same numerical value for r, no matter what the matrix A is.* 

Now, suppose there is a feature space in which the clusters are spherical and the Euclidean metric provides the right way to measure the distance from y to my. In that space, the covariance matrix is the identity matrix, and r is exactly the Euclidean distance from y to my. But since we can get to that space from the x space through a linear transformation, and since r is invariant to linear transformation, we can equally well compute r directly from 

 .

Left arrow Back to Covariance Right arrow On to MetricUp arrow Up to Mahalanobis


from: https://www.cs.princeton.edu/courses/archive/fall08/cos436/Duda/PR_Mahal/cov_mat.htm

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值