Statistical Prediction
3 min
the statistical prediction processor forecasts future values by applying a fast fourier transform (fft) to a time series signal why use statistical prediction use this processor when a signal has a repeating or cyclical pattern that a straight line trend, like linear prediction's, wouldn't capture, for example, forecasting a signal with seasonal or periodic behavior using its underlying frequency components how it works the processor applies an fft to the signal, uses that to remove the trend from the data, and generates a sine cosine waveform that approximates the signal it then extrapolates that waveform forward to produce the prediction because live data streams in continuously, the processor first fills a window of values it can analyze, then produces a prediction for a future time no output is expected until the window is full; once it is, the processor outputs a prediction and its timestamp on every subsequent input the processor assumes the input tag polls once per second two parameters shape the frequency analysis frequency difference sets the sampling rate for the frequency analysis with a 10 value window, a difference of 1 produces up to 10 frequency samples, and a difference of 2 produces up to five since this is a time series signal already sampled once per second, 1 is usually the right choice number of harmonics sets how many waves are added to the fundamental wave to approximate the signal some signals, such as square waves, need a very large number of harmonics to approximate well start with a low number and increase it only as needed, rather than entering a high number from the start parameters parameter details display prediction on current timestamp when enabled, displays the prediction using the payload's current timestamp instead of the predicted future timestamp window size how many values the processor observes before making each prediction, assuming the input polls once per second number of predictions how many seconds into the future the processor predicts, assuming the input polls once per second frequency difference the frequency sampling distance (in seconds) that sets the resolution of the frequency analysis number of harmonics how many waves the processor adds to the fundamental wave to approximate the signal pass through value determines whether the processor's output is the predicted value or the original unchanged input value related topics use the statistical prediction function docid\ mupb8rycuvj6kdemfusev