[转][译]一种度量准则:推土机距离Earth Mover's Distance(EMD)

以下内容为罗方炜译:

Earth mover’s distance

In computer science, the earth mover’s distance (EMD) is a measure of the distance between two probability distributions over a region D. In mathematics, this is known as the Wasserstein metric. Informally, if the distributions are interpreted as two different ways of piling up a certain amount of dirt over the region D, the EMD is the minimum cost of turning one pile into the other; where the cost is assumed to be amount of dirt moved times the distance by which it is moved [1].

在计算机科学与技术中,地球移动距离(EMD)是一种在D区域两个概率分布距离的度量,就是被熟知的Wasserstein度量标准。不正式的说,如果两个分布被看作在D区域上两种不同方式堆积一定数量的山堆,那么EMD就是把一堆变成另一堆所需要移动单位小块最小的距离之和。

The above definition is valid only if the two distributions have the same integral (informally, if the two piles have the same amount of dirt), as in normalized histograms orprobability density functions. In that case, the EMD is equivalent to the 1st Mallows distance or 1st Wasserstein distance between the two distributions [2] [3].

上述的定义如果两个分布有着同样的整体(粗浅的说,就像两个堆有着同样的数量),在规范化的直方图或者概率密度函数上。在这基础上,EMD等同于两个分布的第一Mallows距离或者第一Wasserstein距离。

Extensions

Some applications may require the comparison of distributions with different total masses. One approach is to allow for a partial match, where dirt from the most massive distribution is rearranged to make the least massive, and any leftover “dirt” is discarded at no cost. Under this approach, the EMD is no longer a true distance between distributions. Another approach is to allow for mass to be created or destroyed, on a global and/or local level, as an alternative to transportation, but with a cost penalty. In that case one must specify a real parameter σ, the ratio between the cost of creating or destroying one unit of “dirt”, and the cost of transporting it by a unit distance. This is equivalent to minimizing the sum of the earth moving cost plus σ times the L1 distance between the rearranged pile and the second distribution.

一些应用需要比较不同总量的分布。一种方法是允许部分匹配,从最大分布上重新安排一些颗粒去产生最少的量,剩下多余的颗粒就被忽视不需要代价。这样的方法,EMD就不是真正两个分布间的距离。另外的方法允许块产生或销毁,在全局或局部范围,可以选择性的转变,但需要花费代价。那样的花,需要指定实数参数σ,这个σ表示产生或销毁一个单位一个距离颗粒所需要的花费。这就等同于最小化地球移动距离总和,花费σ倍重新堆和第二个分布的L1距离。

Computing the EMD

If the domain D is discrete, the EMD can be computed by solving an instance transportation problem, which can be solved by the so-called Hungarian algorithm. In particular, ifD is a one-dimensional array of “bins” the EMD can be efficiently computed by scanning the array and keeping track of how much dirt needs to be transported between consecutive bins.

如果D域是离散的,那么EMD可以用运输问题的Hungarian算法来计算他们的距离。特别的,如果D是一维的数组格子,你们EMD可以有效的通过扫描数组并记录有多少颗粒需要传送于两个连续格子来计算。

External links

§ C code for the Earth Mover’s Distance

§ C++ and Matlab and Java wrappers code for the Earth Mover’s Distance, especially efficient for thresholded ground distances

References

  1. ^ Formal definition
  2. ^ Elizaveta Levina; Peter Bickel (2001). “The EarthMover’s Distance is the Mallows Distance: Some Insights from Statistics”. Proceedings of ICCV 2001 (Vancouver, Canada): 251–256.
  3. ^ C. L. Mallows (1972). “A note on asymptotic joint normality”. Annals of Mathematical Statistics 43 (2): 508–515. doi:10.1214/aoms/1177692631.
  4. ^ a b S. Peleg; M. Werman, and H. Rom (1989). “A unified approach to the change of resolution: Space and gray-level”. IEEE Transactions on Pattern Analysis and Machine Intelligence 11: 739–742.doi:10.1109/34.192468.
  5. ^ “Mémoire sur la théorie des déblais et des remblais”. Histoire de l’Académie Royale des Science, Année 1781, avec les Mémoires de Mathématique et de Physique. 1781.
  6. ^ J. Stolfi, personal communication to L. J. Guibas, 1994
  7. ^ Yossi Rubner; Carlo Tomasi, Leonidas J. Guibas (1998). “A Metric for Distributions with Applications to Image Databases”. Proceedings ICCV 1998: 59–66.
转载自:http://en.wikipedia.org/wiki/Earth_mover‘s_distance

http://en.wikipedia.org/wiki/Transportation_problem

[转][译]一种度量准则:推土机距离Earth Mover's Distance(EMD)

时间: 2024-07-31 13:08:42

[转][译]一种度量准则:推土机距离Earth Mover's Distance(EMD)的相关文章

图像检索之EMD距离(Earth Mover's Distance)

在理解EMD距离模型时,需要先对<运筹学>中运输问题,做一下了解.下面给出几个运输问题的小例子,作为补充知识: 那么,对于上述问题我们发现是一个 产量=销量=500 ,即产销平衡的问题,可以提出这样的数学模型: 假设运到物品的个数为,用代表运到单个物品的运费(在上述表格中都有),用表示产地的产量,表示销地的销量,则总运费为,使总运费最小的数学模型为: 还有令两种可能就是 产量>销量 或者 产量<销量,这里不做模型的讨论,上面三种运输问题都可以用单纯形法进行求解.因为只有当"

搬土距离(Earth Mover&#39;s Distance)

搬土距离(The Earth Mover's Distance,EMD)最早由Y. Rubner在1999年的文章<A Metric for Distributions with Applications to Image Databases>中提出,它是归一化的从一个分布变为另一个分布的最小代价,因此可用于表征两个分布之间的距离. 例如,对于图像而言,它可以看做是由色调.饱和度.亮度三个分量组成,每个分量的直方图就是一个分布.不同的图像对应的直方图不同,因此图像之间的距离可以用直方图的距离表

数学中几种经常使用的距离

数学中有非常多不同种类的距离,经常使用于几何.高等代数等数学研究. 多种多样的距离在数学建模.计算机学习中有着不小的应用. 比方,A*搜索时的评估函数. 比方,在机器学习中,做分类时经常须要估算不相同本之间的类似性度量(Similarity Measurement).这时通常採用的方法就是计算样本间的距离.採用什么样的方法计算距离是非常讲究.甚至关系到分类的正确与否. 欧氏距离(Euclidean Distance) 欧氏距离是最易于理解的一种距离计算方法,源自欧几里得几何中两点间的距离公式.

反距离权重插值inverse distance weighting,IDW

反距离权重 (IDW) 插值显式假设:彼此距离较近的事物要比彼此距离较远的事物更相似.当为任何未测量的位置预测值时,反距离权重法会采用预测位置周围的测量值.与距离预测位置较远的测量值相比,距离预测位置最近的测量值对预测值的影响更大.反距离权重法假定每个测量点都有一种局部影响,而这种影响会随着距离的增大而减小.由于这种方法为距离预测位置最近的点分配的权重较大,而权重却作为距离的函数而减小,因此称之为反距离权重法.

[转发]短文本匹配

文章目录 前言 经典方法 WMD词移距离 BM25 深度文本匹配 DSSM MatchPyramid ESIM BiMPM DIIN DRCN 模型对比论文阅读 Reference 前言 对于检索式对话系统最基本的步骤就是召回(retrieval)-匹配(matching)-排序(reranking).匹配的得分直接决定最后你要输出的答案对应FAQ中的标准问题,所以这是很重要的一步.说是文本匹配,感觉更好的措辞应该是语义匹配.这里借鉴的都是文本匹配/文本蕴含/自然语言推理这个领域的文章. 更多的

概率分布之间的距离度量以及python实现

1. 欧氏距离(Euclidean Distance)       欧氏距离是最易于理解的一种距离计算方法,源自欧氏空间中两点间的距离公式.(1)二维平面上两点a(x1,y1)与b(x2,y2)间的欧氏距离:(2)三维空间两点a(x1,y1,z1)与b(x2,y2,z2)间的欧氏距离:(3)两个n维向量a(x11,x12,-,x1n)与 b(x21,x22,-,x2n)间的欧氏距离:(4)也可以用表示成向量运算的形式: python中的实现: 方法一: import numpy as np x=

概率分布之间的距离度量以及python实现(四)

1.f 散度(f-divergence) KL-divergence 的坏处在于它是无界的.事实上KL-divergence 属于更广泛的 f-divergence 中的一种. 如果P和Q被定义成空间中的两个概率分布,则f散度被定义为: 一些通用的散度,如KL-divergence, Hellinger distance, 和total variation distance,都是f散度的一种特例.只是f函数的取值不同而也. 在python中的实现 : import numpy as np imp

如何使用SAS计算Word Mover的距离

Word Mover的距离(WMD)是用于衡量两个文档之间差异的距离度量,它在文本分析中的应用是由华盛顿大学的一个研究小组在2015年引入的.该小组的论文" 从Word嵌入到文档距离"发表了在第32届国际机器学习大会(ICML)上.在本文中,他们证明了WMD度量导致8个真实世界文档分类数据集中前所未有的低k-最近邻文档分类错误率. 他们利用单词嵌入和WMD对文档进行分类,这种方法相对于传统方法的最大优点是它能够将单个单词对(例如总统和奥巴马)之间的语义相似性合并到文档距离度量中.以传统

直方图 陆地移动距离 cvCalcEMD2 基于HSV的HS

程序: HSize=30,SSize=32:比例为2.89 HSize=20,SSize=20:比例为2.88 HSize=50,SSize=50:比例为2.87 代码: #include "cv.h" #include "cxcore.h" #include "highgui.h" #include <iostream> CvHistogram* histogram(IplImage* src,int HSize,int SSize