ControlCharts.EWMA Method

Definition

Namespace: Numerics.NET.Statistics.ProcessControl
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.4.0

Overload List

EWMA(ReadOnlySpan<Double>, Double, Double, Nullable<Double>, Nullable<Double>) Computes an EWMA (Exponentially Weighted Moving Average) chart from a span of observations.
EWMA(Vector<Double>, Double, Double, Nullable<Double>, Nullable<Double>) Computes an EWMA (Exponentially Weighted Moving Average) chart from a vector of observations.

EWMA(ReadOnlySpan<Double>, Double, Double, Nullable<Double>, Nullable<Double>)

Computes an EWMA (Exponentially Weighted Moving Average) chart from a span of observations.
C#
public static EwmaChartData EWMA(
	ReadOnlySpan<double> observations,
	double lambda,
	double width = 3,
	double? target = null,
	double? sigma = null
)

Parameters

observations  ReadOnlySpan<Double>
The ordered sequence of individual observations.
lambda  Double
The EWMA smoothing constant in (0, 1].
width  Double  (Optional)
The control-limit width multiplier. Defaults to 3.0 for three-sigma limits.
target  Nullable<Double>  (Optional)
The target (reference mean). When null the process mean estimated from the data is used.
sigma  Nullable<Double>  (Optional)
The process sigma. When null the sample-based sigma estimate from the data is used.

Return Value

EwmaChartData
The chart-ready data for the EWMA chart.

Exceptions

ArgumentException The input is empty or contains non-finite values.
ArgumentOutOfRangeExceptionlambda is not in (0, 1], width is not positive, or an explicitly supplied sigma is not positive.

EWMA(Vector<Double>, Double, Double, Nullable<Double>, Nullable<Double>)

Computes an EWMA (Exponentially Weighted Moving Average) chart from a vector of observations.
C#
public static EwmaChartData EWMA(
	Vector<double> observations,
	double lambda,
	double width = 3,
	double? target = null,
	double? sigma = null
)

Parameters

observations  Vector<Double>
The ordered sequence of individual observations.
lambda  Double
The EWMA smoothing constant in (0, 1].
width  Double  (Optional)
The control-limit width multiplier. Defaults to 3.0 for three-sigma limits.
target  Nullable<Double>  (Optional)
The target (reference mean). When null the process mean estimated from the data is used.
sigma  Nullable<Double>  (Optional)
The process sigma. When null the sample-based sigma estimate from the data is used.

Return Value

EwmaChartData
The chart-ready data for the EWMA chart.

Exceptions

ArgumentNullExceptionobservations is null.
ArgumentException The input is empty or contains non-finite values.
ArgumentOutOfRangeExceptionlambda is not in (0, 1], width is not positive, or an explicitly supplied sigma is not positive.

See Also