hnswlib icon indicating copy to clipboard operation
hnswlib copied to clipboard

ef parameter

Open chasingegg opened this issue 5 years ago • 1 comments

Hi, I have an interesting question, ef is used as a search parameter for HNSW, however I don't see this name in other indexes, what does it mean? why you choose the "ef" as its name?

chasingegg avatar Oct 22 '20 06:10 chasingegg

Hi @chasingegg, Initially ef was "ensure factor". In the NSW search algorithm, the result set size was set to the number of the requested nearest neighbors K (that part was designed by @aponom84) and the accuracy was controlled by the number of parallel searches from different seeds. Later the parallel searches part was removed and the size of the set was made a parameter that does not has a very clear interpretation, but leads ("ensures") a better accuracy.

yurymalkov avatar Oct 23 '20 00:10 yurymalkov