mie-lab / trackintel

trackintel is a framework for spatio-temporal analysis of movement trajectory and mobility data.
MIT License
198 stars 50 forks source link

BUG: `calculate_distance_matrix` computes all pairs #594

Closed bifbof closed 8 months ago

bifbof commented 8 months ago

fixes #592 One of the added tests has a very generous relative tolerance, this is due to #593. I made this function probably quite a bit slower. I thought that correctness is more important and if nobody experienced this bug in 3 years maybe it isn't called that often either. Tried to use pairwise distance for everything. That wasn't possible for the LineStrings as sklearn and scipy both enforce float as data type. Thus I copied the code out of sklearn and adapted it a bit.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e98354d) 93.15% compared to head (061299e) 93.30%.

:exclamation: Current head 061299e differs from pull request most recent head c1b4182. Consider uploading reports for the commit c1b4182 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #594 +/- ## ========================================== + Coverage 93.15% 93.30% +0.14% ========================================== Files 33 33 Lines 2104 2076 -28 Branches 374 368 -6 ========================================== - Hits 1960 1937 -23 + Misses 130 127 -3 + Partials 14 12 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.