Count-Min Frequency Sketch
Estimate stream frequencies with bounded counters and inspect the collisions behind overestimation.
Free theory articleEstimate stream frequencies with bounded counters and inspect the collisions behind overestimation.
Concept & interpretation
The Count-Min Sketch is a probabilistic data structure that serves as a frequency table of events in a stream of data. It uses hash functions to map events to frequencies, but unlike a hash table, it uses sub-linear space at the cost of overcounting some events due to collisions.
Experiment
Let's verify this using the interactive tool. First, select the "Skewed" stream.
- Set the Stream control to "Skewed" which sets the text "ABAACADAB".
- Set the Width control to 3.
- Set the Depth control to 2.
- Notice the resulting Sketch Data Structure row displays update in real-time.
- Observe the queried row counts and estimated count are exactly what we calculated manually.