OnTheFlyStats 7.1.0
dotnet add package OnTheFlyStats --version 7.1.0
NuGet\Install-Package OnTheFlyStats -Version 7.1.0
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="OnTheFlyStats" Version="7.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OnTheFlyStats" Version="7.1.0" />
<PackageReference Include="OnTheFlyStats" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OnTheFlyStats --version 7.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: OnTheFlyStats, 7.1.0"
#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.
#:package OnTheFlyStats@7.1.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OnTheFlyStats&version=7.1.0
#tool nuget:?package=OnTheFlyStats&version=7.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
OnTheFlyStats
One-pass (O(N)) descriptive statistics. Statistics are always ready and O(1) to retrieve — no recalculation needed.
Install
dotnet add package OnTheFlyStats
Statistics
- Mean (arithmetic, geometric, root-mean-square)
- Variance (population and sample)
- Standard deviation (population and sample)
- Standard error of the mean
- Z-score / standard score
- Sum, min, max
- Range and mid-range
- Count (N)
Usage
Instead of recalculating mean each loop iteration:
foreach (var item in populationList)
{
averageLabel.Value = populationList.Average(); // O(N²) — never do this
minLabel.Value = populationList.Min();
maxLabel.Value = populationList.Max();
}
Use:
var stats = new Stats();
foreach (var item in populationList)
{
stats.Update(item);
averageLabel.Value = stats.Mean;
minLabel.Value = stats.Min;
maxLabel.Value = stats.Max;
}
Or compute from a collection in one line:
var stats = matrix[x].Stats();
var listMin = stats.Min;
var listMax = stats.Max;
Confusion Matrix
var roc = new ReceiverOperatorCharacteristic(expected, predicted);
Console.WriteLine($"Accuracy: {roc.Accuracy:P1}");
Console.WriteLine($"Sensitivity: {roc.Sensitivity:P1}");
Console.WriteLine($"Specificity: {roc.Specificity:P1}");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Extensions.Standard (>= 12.0.0)
- Newtonsoft.Json (>= 13.0.3)
- StandardInterfaces (>= 3.1.0)
- TextFormatting (>= 2.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on OnTheFlyStats:
| Package | Downloads |
|---|---|
|
Stocks.Data.Infrastructure
Infrastracture for persistance of stock quotes in daily format (open, high, low, close) and import from CSV files in .NET Standard 2.1 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 7.1.0 | 46 | 6/20/2026 |
| 7.0.0 | 309 | 1/30/2025 |
| 6.3.0 | 2,780 | 9/9/2023 |
| 6.2.1 | 316 | 9/8/2023 |
| 6.1.1 | 336 | 8/31/2023 |
| 6.0.0 | 497 | 2/27/2023 |
| 5.0.0 | 765 | 1/30/2022 |
| 4.1.0 | 706 | 1/29/2022 |
| 4.0.0 | 530 | 12/14/2021 |
| 3.5.0 | 778 | 3/23/2021 |
| 3.4.0 | 616 | 3/21/2021 |
| 3.3.1 | 668 | 3/21/2021 |
| 3.3.0 | 658 | 3/21/2021 |
| 3.2.0 | 675 | 2/14/2021 |
| 3.1.0 | 3,064 | 6/15/2018 |
| 3.0.0 | 1,553 | 6/8/2018 |
| 2.4.0 | 1,505 | 6/5/2018 |
| 2.3.0 | 1,852 | 4/1/2018 |
| 2.2.0 | 1,708 | 3/31/2018 |
Loading failed