univie-datamining-team3 / assignment2

Analysis of mobility data
MIT License
0 stars 0 forks source link

Distance measures: Implement dynamic time warping #21

Closed rmitsch closed 6 years ago

rmitsch commented 6 years ago

See implementation of n2-norm for template.

rmitsch commented 6 years ago

@Lumik7 @MoBran Implemented in 0a8d190. It takes a while though despite compiling against Cython and although I added multithreading - currently taking benchmarks.

Suggesting a merge. If there are any obvious performance improvements, we can open up separate issues for them.

Note that this commit requires new dependencies - check requirements.txt.

rmitsch commented 6 years ago

Takes about 17 minutes on my laptop for all trips available so far. Think that's decent.

Lumik7 commented 6 years ago

sounds good to me. Haven't done anything with multithreading or cython in python before, so I cannot really suggest any improvements right away, but 17 minutes should be fine

rmitsch commented 6 years ago

Ad Cython: Me neither, but the code of the module I'm using compiles against Cython (if it's active) at time of module installation. Happens automatically. Ad multithreading: It's rather easy. If you want to check it out, see def _calculate_distance_with_dtw(data, norm: int = 1) and DTWThread.

Merged.