JuliaStats / Distances.jl

A Julia package for evaluating distances (metrics) between vectors.
Other
433 stars 98 forks source link

Fréchet distance #155

Open Kolaru opened 4 years ago

Kolaru commented 4 years ago

I have an (yet untested) implementation of discrete Fréchet distance between curves that I would be happy to share. Is this package a good fit for such kind of distances ? I'm wondering as for what I see all distances defined up to now are distances between vectors.

If it's deemed a good fit, I'll propose a PR.

nalimilan commented 4 years ago

I'm not familiar with the Fréchet distance, but if you can make it fit in the existing framework, then sure.

I'm wondering as for what I see all distances defined up to now are distances between vectors.

What do you mean? What kind of object would your function take?

Kolaru commented 4 years ago

Discrete Fréchet distance is a distance between polygonal curves, so the input would be lists of points (or rather matrices where each column corresponds to a point). So it wouldn't add any dependency but may make internal broadcasting rules for pairwise and colwise significantly more complex (if kept as generic as possible).

nalimilan commented 4 years ago

Mmm, that sounds like a much more ambitious change then. Maybe develop this in another package first. Are there other similar distances that would use the same framework?

Kolaru commented 4 years ago

After doing some reasearch it looks like there is not many other metrics between polygonal curves/object represented by matrices. So there isn't much need for a generic interface as far as I can see.

I'll go for a separate package first as you suggest I think.

captchanjack commented 3 years ago

Hi @Kolaru did you end up create that package for Fréchet distance? Keen to see your implementation as I'm looking for something I can use in my application to compare lines

Kolaru commented 3 years ago

@captchanjack You can find my implementation there https://github.com/Kolaru/FrechetDistance.jl.

I did not end up using it very much, so I haven't spend much time optimizing or testing it, though.