dreams.algorithms.lsh package

Submodules

dreams.algorithms.lsh.lsh module

class dreams.algorithms.lsh.lsh.BatchedPeakListRandomProjection(bin_step=1, max_mz=1000.0, n_hyperplanes=50, subbatch_size=32, seed=3)

Bases: PeakListRandomProjection

Uses numba code to compute hashes for peak_lists given in a shape (num_peak_lists, 2, num_peaks). If subbatch_size is specified additionally splits peak lists into subbatch_size (should be used when dataset is large).

compute(peak_lists: array, as_str=True, logger=None, progress_bar=True)
class dreams.algorithms.lsh.lsh.PeakListRandomProjection(bin_step=1, max_mz=1000.0, n_hyperplanes=50, seed=3)

Bases: object

compute(peak_list: array, as_str=True)
class dreams.algorithms.lsh.lsh.RandomProjection(n_elems: int, n_hyperplanes: int, seed=3)

Bases: object

compute(x: array, as_str=True, batched=False)

Module contents

class dreams.algorithms.lsh.BatchedPeakListRandomProjection(bin_step=1, max_mz=1000.0, n_hyperplanes=50, subbatch_size=32, seed=3)

Bases: PeakListRandomProjection

Uses numba code to compute hashes for peak_lists given in a shape (num_peak_lists, 2, num_peaks). If subbatch_size is specified additionally splits peak lists into subbatch_size (should be used when dataset is large).

compute(peak_lists: array, as_str=True, logger=None, progress_bar=True)
class dreams.algorithms.lsh.PeakListRandomProjection(bin_step=1, max_mz=1000.0, n_hyperplanes=50, seed=3)

Bases: object

compute(peak_list: array, as_str=True)