tdunning/knn — pull request #7 by dfilimon (2012-11-16 17:50:01+00:00)
Title: More refactoring work; rewritten FastProjectionSearch and BallKMeans

Hi Ted,

This is the latest version of the master/ branch as I recently diverged the main code from the mapreduce code (now in the mapreduce/ branch of my repo).

The new features it adds are:

- moved data generation and distance estimation methods into one file (DataUtils.java)

- made StreamingKMeans a value parameterized test (to test with all the searchers and test points one by one as well as all at once)

- rewrote FastProjectionSearch (fixing the open issue from today [1]) and making it cleaner IMHO

- rewrote BallKMeans (mostly a cleanup) and removed the requirement of having the WeightedVectors be hashable by using their indices in the MultinomialSampler. This however means we now have to get a List of datapoints rather than an Iterable. Not an issue for the MapReduce though.

Also, a couple of bugs are fixed (the most notable of which is StreamingKMeans now works when adding points one at a time).

[1] https://github.com/tdunning/knn/issues/6