matsui528 / nanopq

Pure python implementation of product quantization for nearest neighbor search
MIT License
323 stars 43 forks source link

Add parametric initialization option #14

Closed calvinmccarter closed 2 years ago

calvinmccarter commented 2 years ago

The OPQ paper also proposes "eigenvalue allocation," a parametric solution which minimizes the distortion bound of PQ under a multivariate Gaussian distribution. In their Matlab implementation, they use this to initialize R in the nonparametric algorithm. This PR adds a parametric_init option (False by default) which applies this when True.

calvinmccarter commented 2 years ago

@matsui528 -- please feel free to let me know if you'd like me to make any changes needed to get this merged in!

calvinmccarter commented 2 years ago

@matsui528 - done!