Weighted Variance Accumulator<T> Structure
Represents an accumulator for the weighted variance of a sequence.
Definition
Namespace: Numerics.NET.DataAnalysis.Accumulators
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.10.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.10.0
public struct WeightedVarianceAccumulator<T> : IBinaryAccumulator<T, T>
- Implements
- IBinaryAccumulator<T, T>
Type Parameters
- T
- The type of the elements of the sequence.
Remarks
Weights must be finite and nonnegative. Zero weights ignore the observation, including a nonfinite observation. Observations with positive weight must be finite.
A negative or nonfinite weight, a nonfinite observation with positive weight, or nonfinite accumulated state invalidates the accumulator. Its variance and standard deviation then remain NaN, and HasValue is false, until Reset(). Invalid inputs do not throw an argument exception.
The variance is the centered weighted sum of squares divided by total weight. It does not apply a sample or reliability-weight bias correction.
Properties
| Has | Gets whether the accumulator has received enough data to compute a value. |
| Standard | Gets the accumulated standard deviation of the sequence. |
| Variance | Gets the accumulated variance of the sequence. |
Methods
| Add | Updates the accumulator with the specified value. |
| Add | Updates the accumulator with a missing value. |
| Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType) |
| Get | Returns the hash code for this instance. (Inherited from ValueType) |
| Get | Gets the Type of the current instance. (Inherited from Object) |
| Merge | Appends the observations represented by another accumulator to this accumulator. |
| Remove | Updates the accumulator by removing the specified value. |
| Remove | Updates the accumulator by removing a missing value. |
| Reset | Resets the accumulator to its initial state. |
| ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType) |