Skip to content

add distance attribute to knn weights #762

Open
@lanselin

Description

It would be nice if the KNN weights object also included a distance attribute in addition to neighbors and weights. The weights are all 1, which is not informative. In contrast, distance band weights have a binary argument, which if False gives the distance raised to a power.

I believe it would not necessitate any additional calculations. As an example, consider the GWT k-nearest neighbor weights created by GeoDa. Also, sklearn.neighbors KDTree already contains the distances.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions