Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] AR prediction with ZFilter FIR #9

Open
Uiuran opened this issue Oct 18, 2019 · 0 comments
Open

[Question] AR prediction with ZFilter FIR #9

Uiuran opened this issue Oct 18, 2019 · 0 comments

Comments

@Uiuran
Copy link

Uiuran commented Oct 18, 2019

Iam trying to understand how the ZFilter object does its operation in the fitted time series (with Levinson Durbin AutoCorrelation coefficients) when you put the time series in the object caller in order to do Auto Regression, ie, x[t] = a[t-1]*x[t-1]+a[t-2]*x[t-2]+...+a[t-order]*x[t-order]

so i call:

Order=...
zf=levinson_durbin(acorr(timeseries[N-Order-1:N-1]),order=Order) # here iam fitting the 'a' coefficients according to the last Order elements of timeseries

fitted=zf(timeseries[N-Order-1:N-1]).take(Order)) # what exactly the FIR filter is doing here ? when 
 i call take to get Order elements based on the timeseries window of size Order ? 

Seems that the first element of the fitting by FIR, when i call take, is almost exactly the the same of the original series, while the others are not.

I would like to know what the FIR is doing depending upon the argment of .take, and why i cannot take more then Order elements, since i would like to do the AutoRegressive prevision, then use it to do another prevision with the same fitted FIR (like in the AR formula given above).

Thank you for your time and patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant