Closed efkag closed 7 years ago
Hi - the short answer on this is that the GP part of the package was never really finished, so I wouldn't recommend using it. Should give PyMC3 a go for this -> https://github.com/pymc-devs/pymc3.
Thanks! Ross
The problem was that I was passing in a String as shown in this part of the documentation http://www.pyflux.com/docs/gpnar.html#fit
but the parameter requires a kernel object like so:
model = pf.GPNARX(data=data, ar=4, kernel=pf.OrnsteinUhlenbeck(), integ=4, target=['Sl', 'Sr'])
Do you still recommend to not use the NARX api? I am only interested in the NARX model and not the GP part. Does the GP part afffect the NARX? If yes is there another NARX api I can use?
Thanks in advance.
The NARX part is essentially twofold : creating lagged features (AR) which you can plug into any standard regression models, and the non-linear part (which again, is a choice of an algorithm which is not linear regression). You can do this with scikit-learn; alternatively if you want to stay in the probabilistic space, then I'd recommend PyMC3!
So to understand you are saying that I could train an MLP in scikit by setting up the input and output features to represent the lag that a NARX network uses.
Then to run it in a closed loop ,a.k.a predict the outputs for given inputs, I would have to predict the output for an input and then use that output as the lag for my next input prediction.
Is that right?
Thank you.
Yes that sounds like the right approach! You may not have to use an MLP either, can use any non-linear regression algorithm (e.g. RF, SVM, etc).
GP-NARX model
Hi I am using the narx model and the following error is thrown when I try to propose the model.
I am using Python 3.5. I tried changing the input from NumPy to Pandas Data Frame and changing the type of the kernel but nothing seems to work. The IDE identifies the problem to be in line 84 in the library file gpnarx.py.
Please help I don't know how to fix this.