Open anitagraser opened 5 years ago
Hi. are this measurements(DTW ,LCSS ,...) available on movingpandas?
So far, none of the above measurements has been implemented in MovingPandas. Do you happen to know a good existing Python implementation?
I've heard of fastdtw python library for measuring similatiry between trajectories, But don't know whether MovingPandas trajectories could be used as an input for this library or not. This library takes two array and a distance method as inputs for measuring similarity.
I assume fastdtw's MIT license is compatible with BSD. There's not much code in https://github.com/slaypni/fastdtw so it may be better to add this functionality to MovingPandas directly than to add another dependency that doesn't seem to be under active development. But then again it seems to be Cython ... so not sure what that means for MovingPandas packaging.
Hausdorff distance looks like a quick win: https://docs.scipy.org/doc/scipy/reference/generated/scipy.spatial.distance.directed_hausdorff.html
Potentially even easier: https://shapely.readthedocs.io/en/stable/manual.html#object.hausdorff_distance
i use this libraries
hope it helps.
Another potential library: https://github.com/cjekel/similarity_measures
Shapely has Fréchet distance as well now as of 2.x: https://shapely.readthedocs.io/en/stable/reference/shapely.frechet_distance.html#shapely.frechet_distance
Useful distance measures include but are not limited to:
For more details, see Zheng & Zhou (2011) who distinguish global and local distance measures:
Others mentioned by Pelekis & Theodoridis (2016)
References