Skip to content

Commit

Permalink
Merge pull request #61 from outbrain/cms
Browse files Browse the repository at this point in the history
Some improved defaults
  • Loading branch information
SkBlaz committed Jan 26, 2024
2 parents 04d7b2d + 952c7a1 commit ef54a09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions outrank/algorithms/sketches/counting_cms.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CountMinSketch:
A memory-efficient implementation of the count min sketch algorithm with optimized hashing using Numba JIT.
"""

def __init__(self, depth=6, width=2**22, M=None):
def __init__(self, depth=6, width=2**15, M=None):
self.depth = depth
self.width = width
self.hash_seeds = np.array(np.random.randint(low=0, high=2**31 - 1, size=depth), dtype=np.uint32)
Expand All @@ -33,7 +33,7 @@ def _add(M, x, depth, width, hash_seeds, delta=1):
M[i, location] += delta

def add(self, x, delta=1):
if len(self.tmp_vals) < 10 ** 5 or sys.getsizeof(self.tmp_vals) / (10 ** 3) < 100.0:
if len(self.tmp_vals) < 10 ** 4 or sys.getsizeof(self.tmp_vals) / (10 ** 3) < 100.0:
self.tmp_vals.add(x)
CountMinSketch._add(self.M, x, self.depth, self.width, self.hash_seeds, delta)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _read_description():
packages = [x for x in setuptools.find_packages() if x != 'test']
setuptools.setup(
name='outrank',
version='0.95.7',
version='0.95.8',
description='OutRank: Feature ranking for massive sparse data sets.',
long_description=_read_description(),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit ef54a09

Please sign in to comment.