Skip to content

algorithm='auto' should always work for nearest neighbors #4931

@jnothman

Description

@jnothman

I don't think the following is good for users:

>>> NearestNeighbors(metric='cosine')
Traceback:
...
ValueError: Metric 'cosine' not valid for algorithm 'auto'

Why should 'auto' not default to 'brute' when trees do not support the metric? Apart from making it easier for users, a user would get an automatic benefit from using 'auto' if a tree implementation eventually appeared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions