Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1468002
  • 博文数量: 218
  • 博客积分: 6394
  • 博客等级: 准将
  • 技术积分: 2563
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-08 15:33
个人简介

持之以恒

文章分类

全部博文(218)

文章存档

2013年(8)

2012年(2)

2011年(21)

2010年(55)

2009年(116)

2008年(16)

分类:

2009-05-31 22:30:29

欧氏距离:(∑(Xi-Yi)2)1/2,即两项间的差是每个变量值差的平方和再平方根,目的是计算其间的整体距离
即不相似性。
我们熟悉的欧氏距离虽然很有用,但也有明显的缺点。它将样品的不同属性(即各指标或各变量)之间的差别等
同看待,这一点有时不能满足实际要求。例如,在教育研究中,经常遇到对人的分析和判别,个体的不同属性对
于区分个体有着不同的重要性。因此,有时需要采用不同的距离函数。
如果用dij表示第i个样品和第j个样品之间的距离,那么对一切i,j和k,dij应该满足如下四个条件:
①当且仅当i=j时,dij=0
②dij>0
③dij=dji(对称性)
④dij≤dik+dkj(三角不等式)
显然,欧氏距离满足以上四个条件。满足以上条件的函数有多种,本节将要用到的马氏距离也是其中的一种。
第i个样品与第j个样品的马氏距离dij用下式计算:
dij=(xi一xj)'S-1(xi一xj)
其中,xi和xj分别为第i个和第j个样品的m个指标所组成的向量,S为样本协方差矩阵
马氏距离有很多优点。它不受量纲的影响,两点之间的马氏距离与原始数据的测量单位无关;由标准化数据和中
心化数据(即原始数据与均值之差)计算出的二点之间的马氏距离相同。马氏距离还可以排除变量之间的相关性的
干扰。它的缺点是夸大了变化微小的变量的作用。

In , the Bhattacharyya distance measures the similarity of two discrete . It is normally used to measure the separability of classes in .

For discrete probability distributions p and q over the same domain X, it is defined as:

D_B(p,q) = -\ln \left( BC(p,q) \right)

where:

BC(p,q) = \sum_{x\in X} \sqrt{p(x) q(x)}

is the . For continuous distributions, the Bhattacharyya coefficient is defined as:

BC(p,q) = \int \sqrt{p(x) q(x)}\, dx

In either case, 0 \le BC \le 1 and 0 \le D_B \le \infty. DB need not obey the triangle inequality, but \sqrt{1-BC} does obey the triangle inequality.

For multivariate Gaussian distributions pi = N(mi,Pi),

D_B={1\over 8}(m_1-m_2)^T P^{-1}(m_1-m_2)+{1\over 2}\ln \,\left({\det P \over \sqrt{\det P_1 \, \det P_2} }\right),

where mi and Pi are the means and covariances of the distributions, and

P={P_1+P_2 \over 2}.

Note that the first term in the Bhattacharyya distance is related to the Mahalanobis distance.(巴式距离和马氏距离之间的关系)



阅读(13796) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~