# \#distances

**URL:** https://discourse.julialang.org/tag/distances/518.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Compute pairwise distances (Distances.jl)](https://discourse.julialang.org/t/compute-pairwise-distances-distances-jl/54297)

<div class="topic-metadata">

**Author:** [@bhaveshshrimali](https://discourse.julialang.org/u/bhaveshshrimali)\
**Replies:** 9\
**Last updated:** [February 1, 2024, 2:38pm UTC](https://discourse.julialang.org/t/compute-pairwise-distances-distances-jl/54297 "2024-02-01T14:38:22Z")

</div>

While trying to port some of my code from Python (NumPy + Numba) to Julia, I noticed that the pairwise distance evaluation is at times slightly slower when using Distances.jl. It is a pretty trivial piece of code that I …

---

## [How to compute 2D Wasserstein distance](https://discourse.julialang.org/t/how-to-compute-2d-wasserstein-distance/100184)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 12\
**Last updated:** [June 11, 2023, 6:39pm UTC](https://discourse.julialang.org/t/how-to-compute-2d-wasserstein-distance/100184 "2023-06-11T18:39:42Z")

</div>

Hello, I would like to compute the Wasserstein distance between two discrete joint probability distributions. The package ExactOptimalTransport.jl does not appear to support 2D distance, but I wonder whether it can be a…

---

## [String Distance Calculations on GPU](https://discourse.julialang.org/t/string-distance-calculations-on-gpu/57549)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 4\
**Last updated:** [February 17, 2022, 3:38pm UTC](https://discourse.julialang.org/t/string-distance-calculations-on-gpu/57549 "2022-02-17T15:38:42Z")

</div>

How difficult would it be to do this in Julia? It looks like it might be possible to do this with PyTorch: And here are some papers on the topic: https://www.researchgate.net/publication/300042590\_Using\_GPUs\_to\_Spee…

---

## [Understanding Mahalanobis in Distances.jl](https://discourse.julialang.org/t/understanding-mahalanobis-in-distances-jl/59656)

<div class="topic-metadata">

**Author:** [@Jasper\_Hall](https://discourse.julialang.org/u/Jasper_Hall)\
**Replies:** 4\
**Last updated:** [April 26, 2021, 8:19am UTC](https://discourse.julialang.org/t/understanding-mahalanobis-in-distances-jl/59656 "2021-04-26T08:19:13Z")

</div>

I have a working understanding of principles of distances between datasets at a fairly high level (ie perhaps not all the detailed maths). I want to calculate the Mahalanobis distance between a reference dataset and an …

---

## [Fast hamming distance function in Julia that returns a distance matrix](https://discourse.julialang.org/t/fast-hamming-distance-function-in-julia-that-returns-a-distance-matrix/55716)

<div class="topic-metadata">

**Author:** [@giac](https://discourse.julialang.org/u/giac)\
**Replies:** 12\
**Last updated:** [February 21, 2021, 6:20pm UTC](https://discourse.julialang.org/t/fast-hamming-distance-function-in-julia-that-returns-a-distance-matrix/55716 "2021-02-21T18:20:28Z")

</div>

I am trying to compute the hamming distance on a very large dataset. I need to get back a distance matrix between rows in order to run further analysis on this matrix. For my purposes, it is useful that the data are sto…

---

## [Symmetric matrix is not symmetric](https://discourse.julialang.org/t/symmetric-matrix-is-not-symmetric/55479)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 2\
**Last updated:** [February 17, 2021, 6:26pm UTC](https://discourse.julialang.org/t/symmetric-matrix-is-not-symmetric/55479 "2021-02-17T18:26:08Z")

</div>

I’m trying to do a hierarchical clustering of a matrix, and I’m running into a weird problem. Using Distances.jl, I’m doing dm = pairwise(Jaccard(), my\_matrix), and then hclust(dm) from Clustering.jl. But I’m getting ju…

---

## [Distance matrix + clustering with custom distance function](https://discourse.julialang.org/t/distance-matrix-clustering-with-custom-distance-function/52026)

<div class="topic-metadata">

**Author:** [@vshesh](https://discourse.julialang.org/u/vshesh)\
**Replies:** 6\
**Last updated:** [December 18, 2020, 8:43pm UTC](https://discourse.julialang.org/t/distance-matrix-clustering-with-custom-distance-function/52026 "2020-12-18T20:43:39Z")

</div>

Hi I’m new to julia and trying to figure out the best way to compute some distance matrices and evaluate how good my clustering is… I have a custom distance function like this: dist(w::Array{\<:Real,1}, p::Int64 = 2) = …

---

## [Introducing SequencerJ for finding trends in 1-D datasets](https://discourse.julialang.org/t/introducing-sequencerj-for-finding-trends-in-1-d-datasets/49082)

<div class="topic-metadata">

**Author:** [@a5vzener](https://discourse.julialang.org/u/a5vzener)\
**Replies:** 0\
**Last updated:** [October 26, 2020, 10:23pm UTC](https://discourse.julialang.org/t/introducing-sequencerj-for-finding-trends-in-1-d-datasets/49082 "2020-10-26T22:23:42Z")

</div>

I am very pleased to announce the public availability of my first Julia package, \[SequencerJ\](https://github.com/turingtest37/SequencerJ.jl). This is a 100% Julia implementation of the “Sequencer algorithm”, which uses s…
