Control Charts.EWMA Method
Definition
Namespace: Numerics.NET.Statistics.ProcessControl
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.4.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.4.0
Overload List
| EWM | Computes an EWMA (Exponentially Weighted Moving Average) chart from a span of observations. |
| EWM | 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.
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
EwmaChartDataThe chart-ready data for the EWMA chart.
Exceptions
| Argument | The input is empty or contains non-finite values. |
| Argument | lambda 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.
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
EwmaChartDataThe chart-ready data for the EWMA chart.
Exceptions
| Argument | observations is null. |
| Argument | The input is empty or contains non-finite values. |
| Argument | lambda is not in (0, 1], width is not positive, or an explicitly supplied sigma is not positive. |