measure flow #105
Unanswered
zhoujie757
asked this question in
Q&A
Replies: 3 comments
-
Most likely you would want to use the Something like the following could do it: from probables import CountMinSketch
cms = CountMinSketch(width=100000, depth=5) # this can be customized
for e in dataset:
cms.add(e)
# from here, you can then query it after the fact to get counts of data Without more information I don't know what else I can do to help. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your reply. However, how can I query the counts of data?
学习的乐趣
***@***.***
…------------------ 原始邮件 ------------------
发件人: "barrust/pyprobables" ***@***.***>;
发送时间: 2023年3月7日(星期二) 上午8:43
***@***.***>;
***@***.******@***.***>;
主题: Re: [barrust/pyprobables] measure flow (Discussion #105)
Most likely you would want to use the count-min sketch or something similar to count elements as you process the data. This library is designed to allow probabilistic data structures to be used to answer these types of questions.
Something like the following could do it:
from probables import CountMinSketch cms = CountMinSketch(width=100000, depth=5) # this can be customized for e in dataset: cms.add(e) # from here, you can then query it after the fact to get counts of data
Without more information I don't know what else I can do to help.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
It is in the documentation but in essence you can use the from probables import CountMinSketch
cms = CountMinSketch(width=100000, depth=5)
cms.check("github.com") |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to use this code to statistics the frequency of net flow
Beta Was this translation helpful? Give feedback.
All reactions