LoessFilter (FPScript)

21.09.2021

Filters a data set with a Loess smoothing filter (locally weighted regression scatter plot smoothing).

Syntax

LoessFilter(DataSet, SmoothingWidth [ , Iterations = 0 ])

 

The syntax of the LoessFilter function consists of the following parts:

Part

Description

DataSet

The data set to be filtered (smoothed).

Permitted data structures are data series, data matrix, signal, signal series, signal series with two-dimensional X-component und space curve. All numeric data types are permitted.

For the X component additional restrictions do apply.The values must be monotonously increasing.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

SmoothingWidth

Specifies how many neighboring values, including the value to be smoothed, are to be included for smoothing. The smoothing width must be greater than 2 and less than or equal to the data set length.

Permitted data structures are scalar value. Supported data types are 16-bit integer und 32-bit integer.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

Iterations

Specifies how often the algorithm is repeated.

Permitted data structures are scalar value. Supported data types are 16-bit integer und 32-bit integer.

The value must be greater or equal to 0 and less or equal to 10.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 0.

Remarks

The result has the same structure and unit as the argument DataSet.

Loess is locally weighted regression smoothing using an iterative, weighted least-squares method for curve fitting in a two-dimensional scatter plot for which two types of weighting are used: proximity weighting and robust weighting. A quadratic function is used as the model function.

Before filtering, the values are converted into real or complex 64-bit floating point values. The data type of the result is always a real or complex 64-bit floating point value.

Available in

Option Digital Filters

Examples

LoessFilter(Signal, 10, 1)

Smoothes a signal using the Loess smoothing filter and a smoothing width of 10. The algorithm uses one iteration.

See Also

Smooth Function

LowessFilter Function

LoessFilter Function

Digital Filters Option

Signal Smoothing Analysis Object

LOESS/LOWESS Algorithm

Share article or send as email:

You might be interested in these articles