We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
During using the lib CountMinSketch, the counting is unexpected when the item number is larger than the table size.
''' from bounter import CountMinSketch
Cms = None LogCounting = None
def setUp(LogCounting = None): return CountMinSketch(1, width=2, depth=2, log_counting=LogCounting)
Cms = setUp ()
Loop = 8 ItemNum=8
print ("Loop = ", Loop) for i in range (0, Loop): for s in range (0, ItemNum): Cms.increment(str (s))
for s in range (0, 8): print ("Cms[%d] = %d" %(s, Cms[str (s)]))
'''
Cms[0] = 8 Cms[1] = 8 Cms[2] = 0 Cms[3] = 0 Cms[4] = 0 Cms[5] = 0 Cms[6] = 0 Cms[7] = 0
Cms[0] = 22 Cms[1] = 22 Cms[2] = 22 Cms[3] = 24 Cms[4] = 24 Cms[5] = 23 Cms[6] = 23 Cms[7] = 24
the main branch
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
During using the lib CountMinSketch, the counting is unexpected when the item number is larger than the table size.
Steps/Code/Corpus to Reproduce
'''
from bounter import CountMinSketch
Cms = None
LogCounting = None
def setUp(LogCounting = None):
return CountMinSketch(1, width=2, depth=2, log_counting=LogCounting)
Cms = setUp ()
Loop = 8
ItemNum=8
print ("Loop = ", Loop)
for i in range (0, Loop):
for s in range (0, ItemNum):
Cms.increment(str (s))
for s in range (0, 8):
print ("Cms[%d] = %d" %(s, Cms[str (s)]))
'''
Expected Results
Cms[0] = 8
Cms[1] = 8
Cms[2] = 0
Cms[3] = 0
Cms[4] = 0
Cms[5] = 0
Cms[6] = 0
Cms[7] = 0
Actual Results
Cms[0] = 22
Cms[1] = 22
Cms[2] = 22
Cms[3] = 24
Cms[4] = 24
Cms[5] = 23
Cms[6] = 23
Cms[7] = 24
Versions
the main branch
The text was updated successfully, but these errors were encountered: