scikit-learn/scikit-learn — pull request #690 by robertlayton (2012-03-13 10:18:47+00:00)
Title: WIP: NearestCentroid classifier

The NearestCentroid classifier trains by taking the centroid of each class. New instances are assigned to the closest centroid.

The `shrink_threshold` parameter turns the model into the "nearest shrunken centroid" classifier. In this instance, centroids are "shrunk" such that only the top `shrink_threshold` features remain (optionally, you can shrink by a static parameter).

TODO
---------

* Shrinking parameter (including tests)
* Narrative docs
* Reference