gnes.encoder.numeric.hash module¶

class gnes.encoder.numeric.hash.HashEncoder(num_bytes, num_bits=8, num_idx=3, kmeans_clusters=100, method='product_uniform', *args, **kwargs)[source]¶

Bases: gnes.encoder.base.BaseNumericEncoder

batch_size = 2048¶
encode(vecs, *args, **kwargs)[source]¶
Return type:ndarray
hash(vecs)[source]¶
pred_kmeans(vecs)[source]¶
ran_gen()[source]¶
train(vecs, *args, **kwargs)[source]¶

Train the model, need to be overrided

train_kmeans(vecs)[source]¶