Comments (7)
If you want to learn how to shape your data, take a look at the examples with long=False
. I'd rename your columns storeA_product1, storeA_product2, storeB_product1
and so on, and the just pass as many columns as you need. Behind the scenes all data is made into the "wide" format before AutoTS runs the models.
For regressors try following the example here:
https://github.com/winedarksea/AutoTS/blob/dev/extended_tutorial.md#adding-regressors-and-other-information
Some models only take one variable but I handle the dimensionality reduction for you, so pass in as many variables as you want for a regressor.
@catchlui
from autots.
@winedarksea Do I create every autots for each store_product, by using a loop?
like:
for p in store_prodct:
model = autots(subset, x, x, ,x )
from autots.
You can do it that way, however autots accepts multivariate data so either passing wide style data or using long format data with the series_id distinct for each store_product will work.
For large scale it often makes sense to combine the two approaches. Loop AutoTS through high level groupings like product category or store regions, then in each of those subsets run a single AutoTS run on all store_products
from autots.
@winedarksea
I added a column company in the data you mentioned.
For the model.fit, I just passed id_col = 'company':
model = model.fit(
df,
id_col='company',
)
Is this correct?
For the forecasting:
prediction = model.predict(forecast_length = 30, verbose=0)
forecasts_df = prediction.forecast
It only returns company B:
from autots.
So your data format in that example data is wide
style data. In this case, each column is a target series. So instead of CSUSHPISA you would have "companyB_product1" and for EMVOVERALLEMV you might have "companyA_product1" or whatever as appropriate
If using long
style data your approach would work if you had three target series, and company was the series_id. It looks like you are using a load_monthly example so you can switch to long example data by load_monthly(long=True)
from autots.
I see. What I am really want to do is using exogenous variables, with series id: forecast sales for different country, with exogenous variables. Any suggestions?
from autots.
future_regressor
is for those features which you know about the future. For series you don't know in the future, pass them in as additional series to forecast and some multivariate models will use them as features. I haven't personally found much actual value in a single categorical feature that is constant so there isn't direct support for that all though you could pass it in as a future regressor. Study the production_example.py in this repo for one general approach
from autots.
Related Issues (20)
- Limited Holiday Calendar Functionality in autots FBProphet for Time Series Prediction HOT 3
- model.predict gives different forecast depending on forecast_length HOT 5
- GluonTS not using all available (CPU) resources HOT 14
- Use only one variable as the target but supply many features to models. HOT 9
- Save best model for each serie instead of best model overall HOT 2
- Running out of RAM in 0.6.3 HOT 6
- adding autos package to https://repo.anaconda.com/pkgs/snowflake/ HOT 2
- In AutoTS class, custom dataframe is not being picked as initial_template HOT 2
- GluonTS model 'hangs' (on second template?) HOT 2
- Theta Template Eval Error HOT 3
- Fatal error on SeasonalityMotifImputer transformer HOT 2
- Additional metrics HOT 1
- if forecast_length == 'self': HOT 1
- AutoTS multiple variables HOT 5
- import_template erro Expecting value: line 1 column 1 (char 0) HOT 4
- support for forecast issue time HOT 1
- Supply Multiplevariate data to Predict() HOT 1
- Template Eval Error for most of the powerful and effective models HOT 3
- Error on HolidayTransformer since 0.6.12 HOT 3
- DMD template is in incorrect format and causes JSONDecoder exception. HOT 4
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 autots.