Lesson 11: nmslib spaces?


(Nick) #1

In lesson 11, Jeremy uses the angulardist space for similarity measure using nmslib.

Is there a list of spaces which nmslib supports somewhere?


(Alex) #2

There is no much documentation in nmslib itself on it, but I guess this is ultimate list: https://github.com/nmslib/nmslib/blob/d3cc0899604698f1e78867cf5396031268db55f1/similarity_search/include/space/space_scalar.h#L31


(Nick) #3

Yeah I found this. But that doesn’t seem to be all the spaces

It lists:

#define SPACE_COSINE_SIMILARITY  "cosinesimil"
#define SPACE_ANGULAR_DISTANCE   "angulardist"
#define SPACE_NEGATIVE_SCALAR    "negdotprod"

But https://github.com/nmslib/nmslib/tree/master/python_bindings/notebooks has at least the following:

space='jaccard_sparse'
space='l2sqr_sift'
space='cosinesimil_sparse'
space='kldivgenfast'
space='l2'

(Alex) #4

Here on page 31: https://github.com/nmslib/nmslib/blob/master/manual/manual.pdf

However, jaccard seems to be missing…


(Nick) #5

Thanks. That is better than I had found.