Class MovingAverageByExtension
- java.lang.Object
-
- dev.nm.dsp.univariate.operation.system.doubles.MovingAverageByExtension
-
- All Implemented Interfaces:
Filter
public class MovingAverageByExtension extends Object implements Filter
This implements a moving average filter with these properties: 1) both past and future observations are used in smoothing; 2) the head is prepended with the first element in the inputs (x_t = x_1 for t < 1); 3) the tail is appended with the last element in the inputs (x_t = x_n for t > n). When the filter length is even, more of the filter is forward in time than backward. Note that both past as well as future values are used in generating the outputs. Be cautious to use this in a forecasting model.
-
-
Constructor Summary
Constructors Constructor Description MovingAverageByExtension(double[] filter)
Construct a moving average filter with prepending and appending.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
transform(double[] x)
Transforms the input signal into the output signal.
-