Code Monkey home page Code Monkey logo

Comments (2)

jlmelville avatar jlmelville commented on September 26, 2024

Imagine you are searching for neighbors and you come across item $a$ which has a distance of $1.1$. In your current set of neighbors the furthest distance is currently $1.0$, so $a$ can't be in the nearest neighbor list.

But what if $a$ had a neighbor $b$ whose distance to you was only $0.9$? That is in your nearest neighbor list. But if you had already discarded $a$ for being too far away you would never get round to checking any of its neighbors so you could very easily miss $b$ (you would need it to be in the neighbor list of another item that you did check).

What $\varepsilon > 0$ does is allow for situations like the above where you explore the neighbors of $a$ as long as its distance is not much bigger than your current neighbors. The definition of "bigger" gets more generous as you increase $\varepsilon$.

But you don't want to set $\varepsilon$ too high: this means you end up searching everything which is exceptionally wasteful (and hence slow). Imagine an item $c$ which has a distance to you of $10000$: it would be very unlikely that $c$ had any neighbors that were worth searching so you really would want to avoid looking at its neighbors without any regrets.

Hope this helps.

from pynndescent.

Krishnan-9 avatar Krishnan-9 commented on September 26, 2024

Thank you!

from pynndescent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.