arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.23651stat.CO
收藏

Scipy 中多维 Wasserstein 距离的实现

Multi-Dimensional Wasserstein Distance Implementation in Scipy

Utrecht University(乌得勒支大学)

Zehao Lu

AI总结:

本文在 Scipy 中实现了多维 Wasserstein 距离,通过将问题转化为线性规划并利用现有求解器,扩展了原一维函数的功能,并附带文档和测试,将合入主分支。

摘要:

Wasserstein 距离,也称为推土机距离或最优传输距离,是一种广泛使用的概率分布之间相似性的度量。本文提出了在 Scipy(Python 中一个强大的科学计算包)中基于线性规划的多维 Wasserstein 距离函数的实现。在现有的一维 scipy.stats.wasserstein_distance 函数的基础上,我们的工作扩展了其处理多维分布的能力。为了计算多维 Wasserstein 距离,我们开发了一种将问题转化为线性规划问题的实现。我们利用 scipy 线性规划求解器来有效求解该转化后的问题。所提出的实现包括详尽的文档和全面的测试用例,以确保准确性和可靠性。该功能将合并到 Scipy 主开发分支中,并包含在即将发布的版本中,进一步增强 Scipy 在多维统计分析领域的能力。

英文摘要:

The Wasserstein distance, also known as the Earth mover distance or optimal transport distance, is a widely used measure of similarity between probability distributions. This paper presents an linear programming based implementation of the multi-dimensional Wasserstein distance function in Scipy, a powerful scientific computing package in Python. Building upon the existing one-dimensional scipy.stats.wasserstein_distance function, our work extends its capabilities to handle multi-dimensional distributions. To compute the multi-dimensional Wasserstein distance, we developed an implementation that transforms the problem into a linear programming problem. We utilized the scipy linear programming solver to effectively solve this transformed problem. The proposed implementation includes thorough documentation and comprehensive test cases to ensure accuracy and reliability. The resulting feature is set to be merged into the main Scipy development branch and will be included in the upcoming release, further enhancing the capabilities of Scipy in the field of multi-dimensional statistical analysis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑