1. A priority random sampling algorithm for time-based sliding windows over weighted streaming data
- Author
-
Li Zhanhuai, Zhang Yang, Yu Min, Zhang Longbo, and Zhao Yi-qiang
- Subjects
Data stream ,Computer science ,Streaming data ,Sliding window protocol ,Key (cryptography) ,Slice sampling ,Sampling (statistics) ,Time based ,Algorithm - Abstract
This paper introduces the problem of random sampling from time-based sliding windows over weighted streaming data and presents a priority random sampling (PRS) algorithm for this problem. The algorithm extends classic reservoir-sampling algorithm and weighted random sampling algorithm with a reservoir to deal with the expiration of data items from time-based sliding window, and can avoid drawbacks of classic reservoir-sampling algorithm and weighted sampling algorithm with a reservoir. In the new algorithm, a key is assigned for each data item in the time-based sliding window by compromising its weight and arrival time, and works even when the number of data items in a sliding window varies dynamically over time. The experiments show that PRS algorithm is somewhat superior to WRS algorithm.
- Published
- 2007