zoukankan      html  css  js  c++  java
  • The Earth Mover's Distance

    The EMD is based on the minimal cost that must be paid to transform one distribution into the other.Intuitively,given two distributions,one can be seen as a mass of earth properly spread in space,the other as a collection of holes in that same space.Then,the EMD measures the least amount of work needed to fill the holes with earth.Here,a unit of work corresponds to transporting a unit of earth by a unit of ground distance.

      This can be formalized as the following linear programming problem:

        Let P={(p1,wp1),...,(pm,wpm)}

    be the first signture with m clusters,where pis the cluster representative and wpi is the weight of the cluster; 

        Q={(q1,wq1),...,(qn,wqn)}

    the second signature with n cluster; and 

        D=[dij

    the ground distance matrix where dij is the ground distance between cluster pi and qj .

      We want to find a flow

        F=[fij]

    with fij the flow between pi and qj, that minimizes the overall cost 

      

    subject to the following constranits:

    Constraint (1) allows moving "supplis" from P to Q and not vice versa. Constraint (2) limits the amount of supplies that can be sent by the clusters in P to their weights.Constaint (3) limits the clusters in Q to receive no more supplies than their weights; and constraint (4) forces to move the maximum amount of supplies possible. We call this amount the total flow. Once the transportation problem is solved, and we hve found the optimal flow F, the earth mover's distance is defined as the resulting work normalied by the total flow:

    The normalization factor is the total weight of the smaller signature, because of constraint (4). This factor is needed when the two signatures have different total weight, in order to avoid favoring smaller signatures. In general, the ground distance dij can be any distance and will be chosen according to the problem at hand.

  • 相关阅读:
    flask helloworld
    (16)centos7 日志文件
    (15)centos7 系统服务
    (14)centos7 进程管理
    (13)centos7 任务计划
    (12)centos7 环境变量配置
    [BZOJ2045]双亲数(莫比乌斯反演)
    bzoj2018 [Usaco2009 Nov]农场技艺大赛
    bzoj 1001 [BeiJing2006]狼抓兔子
    bzoj 5056: OI游戏 最短路树的计数
  • 原文地址:https://www.cnblogs.com/alsofly/p/3516637.html
Copyright © 2011-2022 走看看