gnes.encoder.numeric.hash module

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

Bases: gnes.encoder.base.BaseNumericEncoder

batch_size = 2048
encode(vecs: numpy.ndarray, *args, **kwargs) → numpy.ndarray[source]
hash(vecs)[source]
pred_kmeans(vecs)[source]
ran_gen()[source]
train(vecs: numpy.ndarray, *args, **kwargs)[source]

Train the model, need to be overrided

train_kmeans(vecs)[source]