pavlin-policar / openTSNE

Extensible, parallel implementations of t-SNE
https://opentsne.rtfd.io
BSD 3-Clause "New" or "Revised" License
1.44k stars 158 forks source link

Add sklearn nearest_neighbor search with method="auto" #163

Closed pavlin-policar closed 3 years ago

pavlin-policar commented 3 years ago
Issue

162

Description of changes

I initially thought we could get rid of all the cosine distance logic, but it turns out that scikit-learn doesn't implement it. So that workaround stays. Basically, this is just a copy of BallTree, but with method="auto".

I've also deprecated BallTree, which will be removed in future versions. Then, we can also get rid of this code duplication.

Includes
dkobak commented 3 years ago

Should the neighbors="exact" now call the new class?

pavlin-policar commented 3 years ago

Absolutely. I missed that. Thanks!