We observe that computing empirical Wasserstein distance in the independence test is an optimal transport (OT) problem with a special structure. This observation inspires us to study a special type of OT problem and propose a modified Hungarian algorithm to solve it exactly. For an OT problem between marginals with $m$ and $n$ atoms ($m\geq n$), the computational complexity of the proposed algorithm is $O(m^2n)$. Computing the empirical Wasserstein distance in the independence test requires solving this special type of OT problem, where we have $m=n^2$. The associate computational complexity of our algorithm is $O(n^5)$, while the order of applying the classic Hungarian algorithm is $O(n^6)$. Numerical experiments validate our theoretical analysis. Broader applications of the proposed algorithm are discussed at the end.
翻译:我们认为,在独立测试中计算实验性瓦西斯坦距离是一个特殊结构的最佳运输问题。 这一观察启发了我们研究一种特殊类型的OT问题,并提出一个修改的匈牙利算法来确切解决它。对于以美元和原子(m\geq n$)的边缘之间的OT问题,拟议算法的计算复杂性为$O(m ⁇ 2n)美元。计算独立测试中的经验性瓦西斯坦距离需要解决这种特殊类型的OT问题,我们有美元=n ⁇ 2$。我们算法的关联计算复杂性是$O(n ⁇ 5)美元,而应用经典匈牙利算法的顺序是$O(n ⁇ 6)美元。数字实验证实了我们的理论分析。最后将讨论拟议的算法的更广泛应用。