2002 · 334 citations · 5 references
ComputingComputer ScienceAlgorithmsData MiningStochastic ProcessesMemory Hierarchy OptimizationSampling TheoryStream ProcessingStreaming AlgorithmsData Stream ProcessingReservoir SamplingSamplingSliding Window AlgorithmsStream MiningStream SamplingWindowed Stream Processing
Sampling from a moving window of recent items in a data stream is challenging, particularly when the window size varies with time. The study introduces the problem of sampling from such a moving window and proposes two algorithms to address it. The authors present chain‑sample, which extends reservoir sampling to handle element expiration, and priority‑sample, which functions even when the window size changes dynamically. Both algorithms achieve high‑probability memory usage of O(k log n), with chain‑sample also attaining expected O(k) memory.
We introduce the problem of sampling from a moving window of recent items from a data stream and develop two algorithms for this problem. The first algorithm, chain-sample, extends reservoir sampling to deal with the expiration of data elements from the sample. The expected memory usage of our algorithm is O(k) when maintaining a sample of size k over a window of the n most recent elements from the data stream, and with high probability the algorithm requires no more than O(k log n) memory.When the number of elements in the window is variable, as is the case when the size of the window is defined as a time duration rather than as a fixed number of data elements, the sampling problem becomes harder. Our second algorithm, priority-sample, works even when the number of elements in the window can vary dynamically over time. With high probability, the priority-sample algorithm uses no more than O(k log n) memory.
5
Random sampling with a reservoir
Jeffrey Scott Vitter · ACM Transactions on Mathematical Software · 1985 · 1.8K citations · Full text
Continuous queries over data streams
Shivnath Babu, Jennifer Widom · ACM SIGMOD Record · 2001 · 724 citations
Dynamic Maintenance of Wavelet-Based Histograms
Yossi Matias, Jeffrey Scott Vitter, Min Wang · 2000 · 162 citations
C. Aragon, Raimund Seidel · 1989 · 154 citations