RunningStatistics 0.3.0
See the version list below for details.
dotnet add package RunningStatistics --version 0.3.0
NuGet\Install-Package RunningStatistics -Version 0.3.0
<PackageReference Include="RunningStatistics" Version="0.3.0" />
<PackageVersion Include="RunningStatistics" Version="0.3.0" />
<PackageReference Include="RunningStatistics" />
paket add RunningStatistics --version 0.3.0
#r "nuget: RunningStatistics, 0.3.0"
#:package RunningStatistics@0.3.0
#addin nuget:?package=RunningStatistics&version=0.3.0
#tool nuget:?package=RunningStatistics&version=0.3.0
RunningStatistics
Online (single pass) algorithms for statistical measures based on the Julia package OnlineStats.jl by Josh Day. Useful for streaming and big data.
List of Statistics
| Statistic | Description |
|---|---|
| Mean | The univariate mean |
| Sum<T> | The overall sum of any INumber<T> type |
| Variance | The univariate variance |
| Extrema | The min and max observations and their counts |
| Moments | Mean, Variance, Skewness, and (excess) Kurtosis |
| EmpiricalCdf | Approximate order statistics (quantiles) |
| CountMap<T> | Counts for each unique value |
| ProportionMap<T> | Proportions for each unique value |
| Histogram | A histogram with specified bin edges |
| Normal | The univariate mean and variance |
Methods
The IRunningStatistic<in TObs> interface provides the following members:
public interface IRunningStatistic<in TObs>
{
public long Nobs { get; }
public void Fit(IEnumerable<TObs> values);
public void Fit(TObs value);
public void Reset();
}
The IRunningStatistic<in TObs, out TValue> interface provides the additional member:
public interface IRunningStatistic<in TObs, out TValue> : IRunningStatistic<TObs>
{
public TValue Value { get; }
}
Finally each statistic implements IRunningStatistic<in TObs, out TValue, TSelf> to ensure a consistent set of functionality:
public interface IRunningStatistic<in TObs, out TValue, TSelf> : IRunningStatistic<TObs, TValue> where TSelf : IRunningStatistic<TObs, TValue, TSelf>
{
public TSelf CloneEmpty();
public TSelf Clone();
public void Merge(TSelf other);
public static abstract TSelf Merge(TSelf first, TSelf second);
}
Therefore merging can only be done when the concrete classes are known, and concrete classes may be cloned.
Examples
using RunningStatistics;
var mean1 = new Mean();
var mean2 = new Mean();
var ecdf = new EmpiricalCdf();
var rng = new Random();
for (var i = 0; i < 1000; i++)
{
var x = rng.NextDouble();
mean1.Fit(x);
mean2.Fit(2*x);
ecdf.Fit(x);
}
mean1.Merge(mean2);
var q1 = ecdf.Quantile(0.25);
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 is compatible. 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. net7.0-windows7.0 is compatible. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net7.0
- No dependencies.
-
net7.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.1.0 | 222 | 9/22/2025 |
| 3.0.0 | 184 | 7/30/2025 |
| 2.0.1 | 258 | 1/30/2025 |
| 2.0.0 | 236 | 1/4/2025 |
| 1.1.1 | 352 | 6/6/2023 |
| 1.1.0 | 301 | 4/27/2023 |
| 1.0.2 | 305 | 4/13/2023 |
| 1.0.1 | 303 | 4/13/2023 |
| 1.0.0 | 317 | 4/12/2023 |
| 0.3.1 | 325 | 4/5/2023 |
| 0.3.0 | 332 | 4/4/2023 |
| 0.2.0 | 567 | 5/26/2022 |
| 0.1.1-alpha | 340 | 5/13/2022 |
| 0.1.0-alpha | 336 | 4/29/2022 |