cmuparlay / ParlayANN

A library of algorithms for approximate nearest neighbor search in high dimensions, along with a set of useful tools for designing such algorithms.
MIT License
88 stars 21 forks source link

Extracting neighbors for query set #1

Closed jaredcthomas closed 8 months ago

jaredcthomas commented 12 months ago

Is it possible to save the nearest neighbors after querying (not just performance metrics)?

magdalendobson commented 11 months ago

Thanks for pointing out this issue and sorry for the delay as your question coincided with summer vacations. Currently we don't provide this functionality, but we're adding it to the to-do list for our upcoming refactor.

In the meantime, I think it wouldn't be too tricky to repurpose the functions in the file parsing code, or to simply write the ids out to a sequence and use the parlay function writeIntSeqToFile, or similar.

magdalendobson commented 8 months ago

We just added the ability to save the groundtruth in binary to a file by adding a save function to the GroundTruth object.