Skip to main content
TDigest package icon

TDigest

T-Digest is an online percentile and quantile estimation algorithm that can be used to estimate highly accurate values of the median, 90th percentile, 99th percentile etc of a data set while only storing a small bounded fraction of the dataset. This is useful for computing percentiles on arbitrarily large data-sets, or streaming data. This is useful because true percentiles require having the entire data-set in sorted order, which isn't feasible for many situations. Original research paper on T-Digest can be found here: https://github.com/tdunning/t-digest/blob/master/docs/t-digest-paper/histo.pdf Example usage: using StatsLib; ... TDigest digest = new TDigest(); Random r = new Random(); for (int i=0; i<1000000; i++) { digest.Add(r.NextDouble()); } var median = digest.Quantile(.5); var n90th = digest.Quantile(.9); var n99th = digest.Quantile(.99); var n999th = digest.Quantile(.999);

Total Downloads
373.3K
373,347
Published
Jun 16, 2015
Latest stable version

Install

.NET CLI
dotnet add package TDigest --version 1.0.2
Package Manager Console
Install-Package TDigest -Version 1.0.2
PackageReference
<PackageReference Include="TDigest" Version="1.0.2" />

Frameworks

No framework metadata available.

Dependencies

C5
Any
[2.3.0.1, )

Adoption guide

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.

No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

How to read this guidance

Sources: published NuGet v3 registry metadata and explicit NuBrowse editorial guides. Refresh: package metadata is refreshed from NuGet when the page loads. Limit: this is not a security, legal or compatibility guarantee; validate the selected version in your project.

Useful next steps

Move from package metadata to a concrete selection or review workflow.