Repository: erikbern/ann-benchmarks
Issue: extracting bruteforce NN class with proper citation

Hi @erikbern et al,
thanks so much for providing this wonderful venue to see benchmarks of ANN implementations. 

I am wondering if you would support me in extracting the [BruteForceBLAS](https://github.com/erikbern/ann-benchmarks/blob/a851a311ec8ac2488383fdfb06a185d8bc3e8062/ann_benchmarks/algorithms/bruteforce.py#L33) into a separate package and publish it on PyPI and/or conda? I would keep the license (or choose a compliate one). I would also keep the citation so that you and your collaborator's work are properly cited. Your helping hands are of course much appreciated.

In case you are wondering, what I'd need it for, see [this line of research](https://github.com/clovaai/generative-evaluation-prdc). ann-benchmarks at this point brings too many dependencies such that I would include it directly in my projects/repos.

Hi Peter

A general comment: Did you try the brute-force variants provided by sklearn? (https://scikit-learn.org/stable/modules/neighbors.html) I think they are implemented in a pretty similar way.

Ah, that didn't occur to me that `sklearn` offers such functionality. 

But triggered by your comment @maumueller , I found that [`sklearn.neighbors.NearestNeighbors`](https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.NearestNeighbors.html#sklearn.neighbors.NearestNeighbors) offers the value `brute` for the `algorithm` parameter. I wasn't aware of this. I'll have a look.

I had a look at this [see my benchmark code](https://gist.github.com/psteinb/90a8728df5b7d86cb5fafb9bd5e94d9f) with 64k samples of 12dims each (128 queries only). 

```
------------------------------------------------------------------------------------------- benchmark: 4 tests ------------------------------------------------------------------------------------------
Name (time in ms)                         Min                 Max                Mean             StdDev              Median                IQR            Outliers     OPS            Rounds  Iterations
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_euclidean_brutenn_64kints       124.0814 (1.0)      133.0214 (1.0)      127.1111 (1.0)       3.0242 (1.09)     126.4290 (1.0)       3.4418 (1.0)           2;0  7.8671 (1.0)           8           1
test_euclidean_brutenn_64kfloats     135.8958 (1.10)     143.0473 (1.08)     139.4509 (1.10)      2.7712 (1.0)      138.6380 (1.10)      4.9195 (1.43)          3;0  7.1710 (0.91)          7           1
test_euclidean_sklearn_64kints       151.9023 (1.22)     242.1480 (1.82)     176.0281 (1.38)     33.6921 (12.16)    161.2122 (1.28)     39.5281 (11.48)         1;0  5.6809 (0.72)          7           1
test_euclidean_sklearn_64kfloats     211.8933 (1.71)     315.7641 (2.37)     250.9755 (1.97)     45.2206 (16.32)    228.4130 (1.81)     72.6924 (21.12)         1;0  3.9845 (0.51)          5           1
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
```

Appears that brutenn (the one that I took from ann-benchmarks) has a performance edge.

i'm fine using the separate package instead of sklearn