EdgeStats 0.1.0
dotnet add package EdgeStats --version 0.1.0
NuGet\Install-Package EdgeStats -Version 0.1.0
<PackageReference Include="EdgeStats" Version="0.1.0" />
<PackageVersion Include="EdgeStats" Version="0.1.0" />
<PackageReference Include="EdgeStats" />
paket add EdgeStats --version 0.1.0
#r "nuget: EdgeStats, 0.1.0"
#:package EdgeStats@0.1.0
#addin nuget:?package=EdgeStats&version=0.1.0
#tool nuget:?package=EdgeStats&version=0.1.0
EdgeStats
Fast statistics for edge computing.
EdgeStats is a library intended for computing statistics with sets that are subject to constant change. This is useful when computing the statistics for the last N samples of a data stream. This library greatly improves the performance of computing statistics on an edge connected device.
Supported Calulations
Though currently small, the number of calculations provided by this library will grow.
- Mean
- Sample Variance
- Sample Standard Deviation
Utility
This library provideds the following functionality:
- Adding/removing a sample from a set with O(1) time, while occupying O(1) memory.
- A sliding window class that allows for O(1) maintenance of a fixed sample size set containg the N most recently added samples. This has a memory complexity of O(N).
Performance
The bellow benchmarks were performed using BenchmarkDotNet and by taking the standard deviation and mean of a set. Increasing sample means the calculations were performed for every new sample added to the set up to SAMPLE_SIZE. Jumping sample means the calculations were performed on a set containing SAMPLE_SIZE samples, then again on a new set containing the old set plus another SAMPLE_SIZE samples. Fixed sample means the set remained unchanged and the calculations were performed only once.
Usage
Increasing sample
IncrementalStandardDeviation stats = new IncrementalStandardDeviation();
stats.AddSample(1.5);
stats.AddSample(7.6);
stats.AddSample(5.3);
// 2.515287
double standardDeviation = stats.StandardDeviation;
Decreasing sample
DecrementalStandardDeviation stats = new DecrementalStandardDeviation();
stats.AddSample(1.5);
stats.AddSample(7.6);
stats.AddSample(5.3);
// 2.515287
double standardDeviation = stats.StandardDeviation;
stats.RemoveSample(7.6);
// 1.9
standardDeviation = stats.StandardDeviation;
Sliding Window
const int WINDOW_SIZE = 10;
DecrementalStandardDeviation stats = new DecrementalStandardDeviation();
SlidingWindowStatistics slidingWindowStats = new SlidingWindowStatistics(
stats, WINDOW_SIZE);
slidingWindowStats.AddSample(1);
...
slidingWindowStats.AddSample(10);
// 2.872281
double standardDeviation = stats.StandardDeviation;
slidingWindowStats.AddSample(15);
// 3.645545
standardDeviation = stats.StandardDeviation;
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. 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 | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.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 |
---|---|---|
0.1.0 | 460 | 12/31/2020 |
Initial Releases