dstl / Stone-Soup

A software project to provide the target tracking community with a framework for the development and testing of tracking algorithms.
https://stonesoup.rtfd.io
MIT License
403 stars 134 forks source link

Add Squared Mahalanobis distance and cache covariance matrix inversions #684

Closed sdhiscocks closed 2 years ago

sdhiscocks commented 2 years ago

Multiple calls to Mahalanobis measure are common (e.g. comparing measurement predictions to detections), and by caching the matrix inversion, this can avoid repeating this costly operation.

codecov[bot] commented 2 years ago

Codecov Report

Merging #684 (0391745) into main (bfbe6ec) will decrease coverage by 0.00%. The diff coverage is 96.00%.

@@            Coverage Diff             @@
##             main     #684      +/-   ##
==========================================
- Coverage   94.60%   94.60%   -0.01%     
==========================================
  Files         170      170              
  Lines        8548     8563      +15     
  Branches     1654     1657       +3     
==========================================
+ Hits         8087     8101      +14     
  Misses        342      342              
- Partials      119      120       +1     
Flag Coverage Δ
integration 68.53% <76.00%> (+0.02%) :arrow_up:
unittests 92.11% <96.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
stonesoup/measures.py 97.95% <95.45%> (-0.84%) :arrow_down:
stonesoup/mixturereducer/gaussianmixture.py 96.70% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update bfbe6ec...0391745. Read the comment docs.