Skip to content

feat(statistics): add tdigest implementation and related functions - #1456

Merged
Nelson-numerical-software merged 1 commit into
masterfrom
t-digest
Sep 10, 2025
Merged

Nelson-numerical-software merged 1 commit into
masterfrom
t-digest

Conversation

@Nelson-numerical-software

Copy link
Copy Markdown
Collaborator

Add tdigest class and associated methods for efficient quantile estimation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a complete t-digest implementation for efficient quantile estimation in the statistics module. The t-digest is a data structure designed for accurate on-line accumulation of rank-based statistics such as quantiles and cumulative distribution functions, particularly effective for large datasets and extreme quantile estimation.

  • Implementation of a tdigest class with configurable compression parameters
  • Support for percentile and quantile methods with streaming data updates via the + operator
  • Comprehensive test coverage and documentation including examples and benchmarks

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
modules/statistics/functions/@tdigest/*.m Core tdigest class implementation with methods for quantile estimation, compression, and data addition
modules/statistics/tests/test_tdigest.m Test suite covering various scenarios including edge cases with NaN values
modules/statistics/tests/bench_tdigest.m Performance benchmark for tdigest operations
modules/statistics/help/en_US/xml/tdigest.xml Complete documentation with usage examples and method descriptions
modules/statistics/module.iss Installation configuration for tdigest class files
modules/statistics/CMakeLists.txt Build system configuration for tdigest installation
CHANGELOG.md Documentation of the new tdigest feature
Comments suppressed due to low confidence (2)

modules/statistics/tests/bench_tdigest.m:1

  • [nitpick] Missing space after assignment operator. Should be 'a = 1:5000;' for consistency with coding style.
%=============================================================================

modules/statistics/tests/bench_tdigest.m:1

  • [nitpick] Missing space after assignment operator. Should be 'a = 5000:-1:1;' for consistency with coding style.
%=============================================================================

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread modules/statistics/functions/@tdigest/plus.m Outdated
Comment thread modules/statistics/functions/@tdigest/plus.m Outdated
Comment thread modules/statistics/functions/@tdigest/shouldcompress.m
Add tdigest class and associated methods for efficient quantile estimation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants