T-Digest.NET 1.0.3

dotnet add package T-Digest.NET --version 1.0.3                
NuGet\Install-Package T-Digest.NET -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="T-Digest.NET" Version="1.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add T-Digest.NET --version 1.0.3                
#r "nuget: T-Digest.NET, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install T-Digest.NET as a Cake Addin
#addin nuget:?package=T-Digest.NET&version=1.0.3

// Install T-Digest.NET as a Cake Tool
#tool nuget:?package=T-Digest.NET&version=1.0.3                

T-Digest.NET

NuGet NuGet downloads Tests Publish GitHub


.NET Implementation of the relatively new T-Digest quantile estimation algorithm. Useful for calculating highly accurate Quantiles or Percentiles from on-line streaming data, or data-sets that are too large to store in memory and sort, which is required to calculate the true quantile.

Fully refactored fork of quantumtunneling/T-Digest.NET with next changes:

  • Modern .NET frameworks support
  • Highly improved performance
  • A bit better accuracy

The Nuget package for this Implementation can be found here

The T-Digest white paper can be found here


Example Code:

    using TDigestNet;

    ...

    Random random = new();
    TDigest digest = new();

    for (int i = 0; i < 1000000; i++)
    {
        var n = random.NextDouble() * 100;
        digest.Add(n);
    }

    Console.WriteLine($"Average: {digest.Average}");
    Console.WriteLine($"Percentile 10: {digest.Quantile(10 / 100d)}");
    Console.WriteLine($"Percentile 50: {digest.Quantile(50 / 100d)}");
    Console.WriteLine($"Percentile 80: {digest.Quantile(80 / 100d)}");
    Console.WriteLine($"Percentile 99: {digest.Quantile(99 / 100d)}");

License

MIT

Copyright (C) 2023 Aleksej Solomatin

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6.1

  • .NETStandard 2.1

    • No dependencies.
  • net6.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on T-Digest.NET:

Package Downloads
Chaos.Time

Package Description

KustoLoco.Core

KQL querying against local data

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 10,770 9/8/2023
1.0.2 506 9/7/2023
1.0.1 523 9/6/2023
1.0.0 571 9/6/2023