Smoothing.LoessScatterSmoother Method

Returns a delegate that applies a LOESS filter to a signal where values may be unevenly spaced.

Definition

Namespace: Numerics.NET.SignalProcessing
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public static Func<Vector<double>, Vector<double>?, Vector<double>> LoessScatterSmoother(
	int windowLength,
	int robustSteps = 0,
	double delta = 0
)

Parameters

windowLength  Int32
The length of the smoothing window.
robustSteps  Int32  (Optional)
(Optional.) The number of robustness iterations. The default is 0.
delta  Double  (Optional)
(Optional.) Distance within which robust regression is not recomputed.

Return Value

Func<Vector<Double>, Vector<Double>, Vector<Double>>
The filtered signal.

Remarks

The delegate returned by this method takes two vector arguments. The first is the vector of x values. The second is the vector of y values.

When the number of data points is large, the computation time can be reduced by setting delta to a suitable value. After the initial robust regression weights are computed, the full regression is only performed for points that are delta apart. Interpolation is used for any intermediate points.

Exceptions

ArgumentOutOfRangeException

windowLength is less than two.

-or-

windowLength is not odd.

See Also