Hacker News new | ask | show | jobs
by zocoi 3293 days ago
Can someone help explaining why this hash method could improve distance calculation for k-NN? What does it improve compared with Geohash or k-d tree structure?
2 comments

> What does it improve compared with Geohash

From what I can tell, it's the exact same algorithm used by Geohash.

Yep. Geohash is just a fancy name for a z-curve.
1. A geohash is a z-curve.

2. It won't be better than a k-d tree. Dimensionality reduction is usually done when you have really truly huge numbers of dimensions that are sparsely populated and you don't care much about some information loss (e.g., for machine learning) or, in this case, when you have an easy way to create a single dimensional index and you want to force multi-dimensional data into it. In the general case a k-d tree would be objectively better in terms of performance.

And in very many or highly sparse dimensions with few or lazy updates, R-tree or derivatives.