quantiles
by
axiomhq

Description: Optimal Quantile Approximation in Streams

View on GitHub ↗

Summary Information

Updated 58 minutes ago
Added to GitGenius on July 28th, 2024
Created on August 8th, 2018
Open Issues & Pull Requests: 1 (+0)
Number of forks: 10
Total Stargazers: 162 (+0)
Total Subscribers: 10 (+0)

Issue Activity (beta)

Open issues: 1
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 2,784 days
Stale 30+ days: 1
Stale 90+ days: 1

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

The quantiles repository is a Go implementation of optimal quantile approximation algorithms designed for streaming data with error bound guarantees. It is a translation of TensorFlow's quantile helper class, adapted to compute approximate quantiles for weighted datasets while maintaining strict error bounds. The implementation draws from four foundational academic papers spanning from 2001 to 2016, including work on space-efficient online quantile computation, sensor network algorithms, high-speed data stream processing, and the XGBoost tree boosting system.

The core functionality maintains an in-memory multi-level quantile summary that guarantees a maximum approximation error of eps times W, where W represents the total weight across all data points. The algorithm defines two fundamental operations: MERGE, which combines two summaries while preserving error bounds by taking the maximum epsilon value, and COMPRESS, which reduces a summary to b plus one elements while increasing the error bound by 1/b. The design prioritizes fitting the summary size within typical CPU L2 cache constraints to maximize input-output bandwidth utilization while avoiding compute bottlenecks and excessive memory consumption.

For distributed computation scenarios, the algorithm maintains error bounds across multiple workers by requiring worker-computed summaries to have no more than eps divided by h error, where h represents the height of the distributed computation graph. In a MapReduce scenario without a combiner, h equals 2, establishing the error tolerance for individual workers. This approach enables the algorithm to scale across distributed systems while preserving quantile approximation guarantees.

The computational complexity is O of n times log of 1/eps times log of eps times n for compute operations, while memory complexity is O of 1/eps times log squared of eps times n for a single worker streaming through an entire dataset. An epsilon value of zero is explicitly disallowed as it would make the algorithm extremely inefficient. The repository emphasizes that epsilon must be a positive value to maintain practical performance characteristics.

According to GitGenius activity classification, this repository falls within the numerical computation and approximate algorithms domain, with specific focus on quantile estimation, real-time analytics, and streaming data processing. It is categorized as relevant to performance monitoring, latency measurement, and performance metrics, reflecting its use in analyzing data distributions and computing statistical measures on large datasets. The repository connects to other significant projects through overlapping contributors, including golang/go, cilium/cilium, and cloud-custodian/cloud-custodian, indicating its integration within broader infrastructure and data processing ecosystems.

The implementation status shows completed work on online estimators that function without requiring stream finalization and proper documentation. The TODO list indicates that benchmarking and serialization features remain unimplemented. The repository uses CircleCI for continuous integration testing and maintains GoDoc documentation for API reference. The primary design goal centers on maximizing input-output bandwidth efficiency by ensuring the algorithm remains memory-bound rather than compute-bound, making it suitable for high-throughput streaming scenarios where approximate quantile computation with guaranteed error bounds is required.

quantiles
by
axiomhqaxiomhq/quantiles

Repository Details

Fetching additional details & charts...