scikit-learn/scikit-learn — pull request #775 by joonazzz (2012-04-15 13:50:00+00:00)
Title: Radius-based classifier: raise exception, if no neighbors found

Previously radius based classifier continued execution and crashed later, see issue # 760. Now it is better so user will know why program crashes.

It would be even better, if it could print in the error message: what is the minimum radius so that all samples have at least 1 neighbor? I don't know how it should be done, one possibility is using brute force like in RadiusNeighborsMixin.radius_neighbors(), but I guess if there are lots of samples, it can take long to calculate..