Comments (4)
The number of lags can be chosen when you employ an high order method, like HOFTS (the standard), IFTS or PWFTS. In that cases you can inform the order (the number of lags) in the constructor using the 'order' parameter and the lag indexes using the 'lags' parameter. The default 'order' is 2 and the default 'lags' is [1,2]. Check the below the model creation for third order and lags 7,14,21:
from pyFTS.data import SONDA
from pyFTS.partitioners import Grid
from pyFTS.models import hofts
train = SONDA.get_data('glo_avg')[:800]
test = SONDA.get_data('glo_avg')[800:1000]
partitioner = Grid.GridPartitioner(data=train, npart=35)
model = hofts.HighOrderFTS(partitioner=partitioner, order=3, lags=[7, 14, 21])
model.fit(train)
print(model)
forecasts = model.predict(test)
from pyfts.
Thank you for the reply. Based on my understanding if the default order is 2 then I must specify a list with two values of lag. And on the example above the order is 3 that is why the lag has a value of three lags. If the order is 4 or more then lag has four or more values too?
Second question is how do we identify or determine the number of lags per order ( I assume ACF/PACF, but how?)?
Regards,
from pyfts.
Hi! You don't need to specify the lags, it is automatically generated as an incremental list. It is the default and it works for the majority of the situations. BUT sometimes there are more significant lags that help to identify complex patterns. In that case you must use the 'lags' parameter. ACF is a good start, but it won't work always, specially for long memory time series. I am currently working on a hyperparameter optimization tool that helps to identify the best lags.
from pyfts.
Great! My focus at the moment is long time series, I hope the tool will be available soon.
Regards,
from pyfts.
Related Issues (20)
- Question on generators parameter HOT 1
- Bug in binary search HOT 1
- Multi-variate high order FTS model HOT 2
- How the predict function works? HOT 8
- Performance of HOFTS on erratic dataset.
- forecasting algorithms HOT 1
- Look ahead bias in performance measure? HOT 1
- Partitioner.fuzzyfy cannot handle parameters mode='vector' and method='maximum' HOT 3
- One step forecasting HOT 2
- Defining the membership function HOT 2
- how to use hyperparams HOT 6
- Unable to get data
- Can we predict the data out of the sample?
- will it work for multivariate time series prediction both regression and classification HOT 1
- how to use mvts for prediction
- Fuzzyfication with Huarng Partitioner not woking (with fix for this)
- How to calculate rmse and mape
- Plot of Forecasted vs Actual misrepresenting the fit by not inserting None at right index?
- [MAJOR ISSUE] Error in the Calculation of Inverse Transformations for model.predict()
- `np.int` was a deprecated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyfts.