scikit-hubness icon indicating copy to clipboard operation
scikit-hubness copied to clipboard

class skhubness.neighbors.HNSW should support fractional norms

Open ivan-marroquin opened this issue 4 years ago • 2 comments

Hi,

Since this class makes use of nmslib, I think that it should also support fractional norms. The code below shows an example on using fractional norm with nmslib:

import numpy as np import nmslib

X= np.random.randn(100,7)

index= nmslib.init(method= 'hnsw', space= 'lp', space_params= {'p': 0.1}, data_type= nmslib.DataType.DENSE_VECTOR) index.addDataPointBatch(X) index.createIndex()

Thanks for all,

Ivan

ivan-marroquin avatar Jun 08 '21 19:06 ivan-marroquin

Thanks for reporting this. Allowing all spaces that nmslib supports is certainly desirable.

VarIr avatar Jun 09 '21 07:06 VarIr

Fractional norms and various other metrics supported by nmslib will be available in the upcoming scikit-hubness v0.30. (No PyPI yet, but one can already install from the sources).

VarIr avatar Mar 17 '22 21:03 VarIr