Giter VIP home page Giter VIP logo

Comments (4)

erikbern avatar erikbern commented on May 16, 2024

I looked at the code but I'm not sure if it's a bug... the heuristic n * roots.size() is very arbitrary though.

In your case I'm not surprised most of the trees aren't visited because you have so many trees per node. Annoy keeps a priority queue of the most promising nodes (initialized to the roots)

If n is much smaller than K I see why it doesn't visit all the trees though.

Either way the solution is probably to change the n * roots.size() to something that makes more sense. maybe max(_K, n) instead of n?

from annoy.

erikbern avatar erikbern commented on May 16, 2024

Also you really shouldn't need 500 trees for 2000 nodes. It should be enough to have 5-10 trees

from annoy.

yu-dk avatar yu-dk commented on May 16, 2024

Thanks erikbern! I agree with your quick suggestions by now ^_^
ps: 500 trees is just an example, i should calculate the probability before choosing the parameters.

from annoy.

erikbern avatar erikbern commented on May 16, 2024

See #80 – can now specify at query time now many nodes to inspect!

from annoy.

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.