Construct a DecayingCMS module.
Construct a DecayingCMS module.
The seed is used to initialize the hash families used by the count-min sketch. Using the same seed will always produce the same hash family.
Half-life determines the rate at which values in the CMS decay. If a key was counted once at time t, by time (t + halfLife), the value for that key will be 0.5. After enough half lives the value will decay to zero.
The size of the CMS in bytes is O(depth * width).
Width controls the relative error due to over-counting (approximately 1/width). For 1% error, use width=100, for 0.1% error, use width=1000, etc.
Depth controls the probability the error bounds are broken and that probability scales with exp(-alpha * depth) so, a small depth (e.g. 5-10) is fine. Each update requires O(depth) work so you want to keep this as small as possible.