# Wasserstein distance for histograms

**URL:** <https://discourse.julialang.org/t/wasserstein-distance-for-histograms/89083>\
**Category:** Statistics\
**Tags:** question\
**Created:** [October 21, 2022, 8:13pm UTC](https://discourse.julialang.org/t/wasserstein-distance-for-histograms/89083 "2022-10-21T20:13:22Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Dan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dan/32/42581_2.png) [@Dan](https://discourse.julialang.org/u/Dan)\
**Post date:** [October 22, 2022, 11:38pm UTC](https://discourse.julialang.org/t/wasserstein-distance-for-histograms/89083/3 "2022-10-22T23:38:53Z")

</div>

The trick was to get the right synonym for Wasserstein distance. In this case _earth mover distance_. A little google gives:

```julia
https://github.com/mirkobunse/EarthMoversDistance.jl

```

and following the instructions on the README I was able to calculate a distance.  
Thanks mirkobunse (Mirko Bunse).

Also, this thread might be relevant:

> [@Computing discrete Wasserstein (EMD) distance in Julia?](https://discourse.julialang.org/t/computing-discrete-wasserstein-emd-distance-in-julia/9600):
>
> Is there any library in Julia for computing discrete Wasserstein (EMD) given two discrete distributions? Python seems to have a tool for that [http://pot.readthedocs.io/en/stable/index.html](http://pot.readthedocs.io/en/stable/index.html), but if a pure Julia solution is available, it will be better than using PyCall.

---

_[View the full topic](https://discourse.julialang.org/t/wasserstein-distance-for-histograms/89083)._
