Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Adding angular distance for nn search #234

@vgoat21

Description

@vgoat21

I was wondering if it would be possible to add angular distance for nn search. I am currently relying on cosine distance as an alternative. The reason behind this is the limitation of cosine distance when dealing with small angles.

image

It's apparent that cosine distance tends to produce very similar values for small angles, making it challenging to distinguish the subtle differences in vector orientations. This leads to some ambiguity in these intervals which (at least in my application) is not the most appropriate to use.

Angular distance is sensitive not only to the direction but also to the magnitude of vectors. As depicted in the diagram, it yields more distinguishable values within these intervals, thus making it easier to assess the proximity of two vectors accurately.

In my application (and most likely many others) it is crucial to include these subtle differences to get a more accurate 'closeness'.

I think this would be a great addition to a very useful extension.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions