probstructs.ExponentialCountMinSketch¶
-
class
probstructs.
ExponentialCountMinSketch
¶ Bases:
pybind11_builtins.pybind11_object
Exponential count-min sketch (ECM-Sketch) combines CM-Sketch with EH to count number of different elements in the last N elements in the stream.
C++: https://probstructs.readthedocs.io/en/stable/classes.html#exponentialcountminsketch
Methods
get
Get counter for {key}for last {window} elements when on the position {tick} in the stream. inc
Increase counter for {key} by {delta} when on the position {tick} in the stream. -
__delattr__
¶ Implement delattr(self, name).
-
__dir__
()¶ Default dir() implementation.
-
__eq__
¶ Return self==value.
-
__format__
()¶ Default object formatter.
-
__ge__
¶ Return self>=value.
-
__getattribute__
¶ Return getattr(self, name).
-
__gt__
¶ Return self>value.
-
__hash__
¶ Return hash(self).
-
__init__
(self: probstructs.ExponentialCountMinSketch, width: int, depth: int, window: int) → None¶ Create ECM-Sketch with width {width}, depth {depth} to count elmenets in the last {window} elements.
-
__init_subclass__
()¶ This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
-
__le__
¶ Return self<=value.
-
__lt__
¶ Return self<value.
-
__ne__
¶ Return self!=value.
-
__new__
()¶ Create and return a new object. See help(type) for accurate signature.
-
__reduce__
()¶ Helper for pickle.
-
__reduce_ex__
()¶ Helper for pickle.
-
__repr__
¶ Return repr(self).
-
__setattr__
¶ Implement setattr(self, name, value).
-
__sizeof__
()¶ Size of object in memory, in bytes.
-
__str__
¶ Return str(self).
-
__subclasshook__
()¶ Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).
-
get
(self: probstructs.ExponentialCountMinSketch, key: str, window: int, tick: int) → int¶ Get counter for {key}for last {window} elements when on the position {tick} in the stream.
-
inc
(self: probstructs.ExponentialCountMinSketch, key: str, tick: int, delta: int) → None¶ Increase counter for {key} by {delta} when on the position {tick} in the stream.
-