Distinct Counting With a Self-Learning Bitmap
成果类型:
Article
署名作者:
Chen, Aiyou; Cao, Jin; Shepp, Larry; Tuan Nguyen
署名单位:
Alphabet Inc.; Google Incorporated; Rutgers University System; Rutgers University New Brunswick
刊物名称:
JOURNAL OF THE AMERICAN STATISTICAL ASSOCIATION
ISSN/ISSBN:
0162-1459
DOI:
10.1198/jasa.2011.ap10217
发表日期:
2011
页码:
879-890
关键词:
NUMBER
algorithms
摘要:
Counting the number of distinct elements (cardinality) in a dataset is a fundamental problem in database management. In recent years, there has been significant interest to address the distinct counting problem in a data stream setting, where each incoming data can be seen only once and cannot be stored for long periods of time. Many probabilistic approaches based on either sampling or sketching have been proposed in the computer science literature that only require limited computing and memory resources. However, the performances of these methods are not scale invariant, in the sense that their relative root mean square estimation errors (RRMSE) depend on the unknown cardinalities. This is not desirable in many applications where cardinalities can be dynamic or inhomogeneous and many cardinalities need to be estimated. In this article, we develop a novel approach, called self-learning bitmap (S-bitmap) that is scale invariant for cardinalities in a specified range. S-bitmap uses a binary vector whose entries are updated from 0 to 1 by an adaptive sampling process for inferring the unknown cardinality, where the sampling rates are reduced sequentially as more and more entries change from 0 to I. We prove rigorously that the S-bitmap estimate is not only unbiased but scale invariant. We demonstrate that to achieve a small RRMSE value of E or less, our approach requires significantly less memory and uses similar or fewer operations than state-of-the-art methods for many common practice cardinality scales. Both simulation and experimental studies are reported.