WeightedVarianceAccumulator<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#
public struct WeightedVarianceAccumulator<T> : IBinaryAccumulator<T, T>
Inheritance
Object  →  ValueType  →  WeightedVarianceAccumulator<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

HasValue Gets whether the accumulator has received enough data to compute a value.
StandardDeviation 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.
AddMissing Updates the accumulator with a missing value.
EqualsIndicates whether this instance and a specified object are equal.
(Inherited from ValueType)
GetHashCodeReturns the hash code for this instance.
(Inherited from ValueType)
GetTypeGets 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.
RemoveMissing Updates the accumulator by removing a missing value.
Reset Resets the accumulator to its initial state.
ToStringReturns the fully qualified type name of this instance.
(Inherited from ValueType)

See Also