Sampling-based Estimation of the Number of Distinct Values in Distributed Environment

Jiajun Li, Zhewei Wei, Bolin Ding, Xiening Dai, Lu Lu +1 more
6/11/2022
cs.DB

Official code: llijiajun/NDV_Estimation_in_distributed_environment (2 stars, Jupyter Notebook, last commit 2022-06-03).

Abstract

In data mining, estimating the number of distinct values (NDV) is a fundamental problem with various applications. Existing methods for estimating NDV can be broadly classified into two categories: i) scanning-based methods, which scan the entire data and maintain a sketch to approximate NDV; and ii) sampling-based methods, which estimate NDV using sampling data rather than accessing the entire data warehouse.

Show full abstract

Scanning-based methods achieve a lower approximation error at the cost of higher I/O and more time. Sampling-based estimation is preferable in applications with a large data volume and a permissible error restriction due to its higher scalability. However, while the sampling-based method is more effective on a single machine, it is less practical in a distributed environment with massive data volumes. For obtaining the final NDV estimators, the entire sample must be transferred throughout the distributed system, incurring a prohibitive communication cost when the sample rate is significant. This paper proposes a novel sketch-based distributed method that achieves sub-linear communication costs for distributed sampling-based NDV estimation under mild assumptions. Our method leverages a sketch-based algorithm to estimate the sample's {\em frequency of frequency} in the {\em distributed streaming model}, which is compatible with most classical sampling-based NDV estimators. Additionally, we provide theoretical evidence for our method's ability to minimize communication costs in the worst-case scenario. Extensive experiments show that our method saves orders of magnitude in communication costs compared to existing sampling- and sketch-based methods.

View on arXivView PDF

Code Implementations(1)

23Jupyter Notebook, C++Jun 3, 20224 years ago

Similar Papers

Cite this paper

@article{li2022samplingbased,
  title  = {Sampling-based Estimation of the Number of Distinct Values in Distributed Environment},
  author = {Jiajun Li and Zhewei Wei and Bolin Ding and Xiening Dai and Lu Lu and Jingren Zhou},
  year   = {2022},
  eprint = {2206.05476},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.05476}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2206.05476.svg)](https://codeofpaper.com/paper/2206.05476)

Discussion