Transport matrix is missing in the code behind scipy.stats.wasserstein_distance

落爺英雄遲暮 提交于 2020-12-12 05:40:58

问题


Looking at the comments for the code behind scipy.stats.wasserstein_distance which invokes a function called _cdf_distance(p, u_values, v_values, u_weights=None, v_weights=None), it says this function implements the following formula:

l_p(u, v) = \left( \int_{-\infty}^{+\infty} |U-V|^p \right)^{1/p}

However, this is not the Wasserstein distance as I know it since, although I see the distance matrix |U-V| in the above formula comment, the transport matrix is noticeably absent. The transport matrix is supposed to be multiplied against the distance matrix within the integral.

Why is the transport matrix missing from scipy.stats.wasserstein_distance?

来源:https://stackoverflow.com/questions/65131513/transport-matrix-is-missing-in-the-code-behind-scipy-stats-wasserstein-distance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!