VarIr / scikit-hubness

A Python package for hubness analysis and high-dimensional data mining
BSD 3-Clause "New" or "Revised" License
44 stars 9 forks source link

class skhubness.neighbors.HNSW should support fractional norms #69

Open ivan-marroquin opened 3 years ago

ivan-marroquin commented 3 years ago

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

VarIr commented 3 years ago

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

VarIr commented 2 years ago

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).