AIGuys
Published in

AIGuys

Product Quantization: Nearest Neighbor Search

Everyone in the field of AI and ML knows about KNN but if you will dig deeper than you will know that KNN is not a good algorithm for the big datasets. Training time for KNN is O(1) whereas testing time is O(nd*m) (n=training samples, d=dimension of data, m=test samples). This will explode crazily for big datasets. Let me give you a little more perspective on how it looks in terms of numbers. In my personal testing, I used a training sample of size (240000 x 728) and a testing sample of size (40000 x 728). This is not even a big dataset, the time it required to calculate the…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store