Skip to content

KL Gaussian Mixture Reduction : Reduce by around half the loop iterations for finding the minimum index distance

KLGaussianMitrureReductions : Reduce by around half the loop iterations for finding the minimum index distance

  • What we have typically is a 2556 (71*70/2) pairwise distance array (details on "triangular arrays" representation exist in the header file) since we start with 72 components.
  • We find the pair with the minimum distance. We merge the 2 components we recalculate distances with the new component
  • and then we loop over the 2556 distance array (we set the merged to a large number)

With this MR what we try to do is bookeep the fact that a component got merged so we have one less component. So the iterations will be over

0. 2556 
1. 2556 -71 (71 distances to the other elements)
2. 2556 - (71+70)
3. 2556 - (71+70+69)  


//until we reach the the components we want typically 12

 

i.e the elements we need to loop over get reduced each time a component is merged. We need to add some bookeeping code in reset distances so to "swap" elements to the end, but seems that we still can gain quite a bit of time.

Edited by Christos Anastopoulos

Merge request reports