Class Anomaly
Flags a reading that stands out from the ones before it.
public sealed class Anomaly : IDisposable
- Inheritance
-
Anomaly
- Implements
- Inherited Members
Constructors
Anomaly(float, int)
Creates a detector that flags a reading so many deviations out.
public Anomaly(float sigmas, int capacity = 32)
Parameters
sigmasfloatHow far from the mean a reading must be to be flagged; 3 is the usual choice.
capacityintHow many earlier readings the baseline keeps, from 2 to 32, since a spread needs two; 32 unless told fewer.
Exceptions
- ArgumentOutOfRangeException
capacityis not from 2 to 32.
Properties
Capacity
How many readings the baseline keeps.
public int Capacity { get; }
Property Value
Methods
Check(float)
Folds a reading in and reports whether it stands out.
public bool Check(float reading)
Parameters
readingfloatThe reading to check.
Returns
- bool
Whether the reading is further from the mean than the configured number of deviations. Nothing is flagged before two readings are held; from the third on, a reading can be, and one that is not a finite number always is.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()