[scikit-learn] how to make result less number of group with NearestNeighbors?

Joel Nothman joel.nothman at gmail.com
Sun Sep 10 21:41:35 EDT 2017


Given your related post on the issue tracker, I think you're trying to
perform clustering. Use DBSCAN, which is a standard approach to clustering
based on neighborhoods within radius.



On 10 September 2017 at 14:44, Martin Lee <tesleft at hotmail.com> wrote:

>  nbrs = NearestNeighbors(n_neighbors=10,radius=100.0,metric='euclide
> an',algorithm='ball_tree').fit(testing1)
>     distances, indices = nbrs.kneighbors(testing1)
>
> just expect when each point distance less than 100 then group into one
> group
>
>
> Martin
>
> _______________________________________________
> scikit-learn mailing list
> scikit-learn at python.org
> https://mail.python.org/mailman/listinfo/scikit-learn
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-learn/attachments/20170911/5bd059bb/attachment.html>


More information about the scikit-learn mailing list