使用傅立叶分析进行时间序列预测 [英] Using fourier analysis for time series prediction

查看:416
本文介绍了使用傅立叶分析进行时间序列预测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于已知具有季节性或每日模式的数据,我想使用傅立叶分析进行预测.在对时间序列数据执行fft之后,我获得了系数.如何使用这些系数进行预测?

For data that is known to have seasonal, or daily patterns I'd like to use fourier analysis be used to make predictions. After running fft on time series data, I obtain coefficients. How can I use these coefficients for prediction?

我相信FFT假定接收到的所有数据都构成一个周期,那么,如果我仅使用ifft重新生成数据,那么我还将重新生成函数的延续性,那么我可以将这些值用作将来的值吗?

I believe FFT assumes all data it receives constitute one period, then, if I simply regenerate data using ifft, I am also regenerating the continuation of my function, so can I use these values for future values?

简单地说:我对t = 0,1,2,.. 10运行fft,然后在coef上使用ifft,我可以对t = 11,12,.. 20使用重新生成的时间序列吗?

Simply put: I run fft for t=0,1,2,..10 then using ifft on coef, can I use regenerated time series for t=11,12,..20 ?

推荐答案

听起来您想要将外推去噪结合起来.

It sounds like you want a combination of extrapolation and denoising.

您说要在多个时间段内重复观察到的数据.好吧,那就重复一下观察到的数据.无需进行傅立叶分析.

You say you want to repeat the observed data over multiple periods. Well, then just repeat the observed data. No need for Fourier analysis.

但是您也想找到模式".我认为这意味着在观察到的数据中找到主要的频率成分.然后是的,进行傅立叶变换,保留最大的系数,然后消除其余的系数.

But you also want to find "patterns". I assume that means finding the dominant frequency components in the observed data. Then yes, take the Fourier transform, preserve the largest coefficients, and eliminate the rest.

X = scipy.fft(x)
Y = scipy.zeros(len(X))
Y[important frequencies] = X[important frequencies]

关于周期性重复:设z = [x, x],即信号x的两个周期.然后{0,1,...,N-1}中所有kZ[2k] = X[k],否则为零.

As for periodic repetition: Let z = [x, x], i.e., two periods of the signal x. Then Z[2k] = X[k] for all k in {0, 1, ..., N-1}, and zeros otherwise.

Z = scipy.zeros(2*len(X))
Z[::2] = X

这篇关于使用傅立叶分析进行时间序列预测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆