Comments (6)
@avijit1996iiti you should check the output of model.best_model
for each graph. If that model is the same, and the results are significantly different then it is concerning (some models will vary slightly due to randomness on new runs, but should generally look the same).
For consistency, set ensemble=None
. When exporting the template, to only get the same best model you need to .export_template(example_filename, models='best',n=1)
note the n=1
.
Remember it is actually a large collection of models and each run has found a different optimal model. By default, using only a few generations like here, you will see a wide variety in model chosen because it still hasn't gotten close to optimized. Trying setting max_generations
much higher for your runs and you will see that even though it will still choose different models, it will generally have settled near a small optimum selection of model types and features.
from autots.
@avijit1996iiti you are going to need to be a bit more specific to get the best help.
I think the result you are seeing is that when you run AutoTS with many generations, it incorporates randomness into its model search process, and so each run will be slightly different.
What you need to do is run AutoTS, export a template, then if you want the same results, run AutoTS again with 0 generations and importing the model template. You can checkout the extended_tutorial for more on that.
from autots.
read data
biocon=pd.read_csv(r'BIOCON.csv')
#build model
model=AutoTS(forecast_length=15,frequency='infer',ensemble='simple',
drop_data_older_than_periods=200,verbose=0)
fit the model
model=model.fit(biocon,date_col='Date',value_col='Close',id_col=None)
#make the forecast
prediction=model.predict()
forecast=prediction.forecast
#validate
validation=model.results('validation')
I am using the above code. It would be great if you can specify what changes should I do to get reproducible results.
from autots.
Result of first run
Result of second run
Result of third run
from autots.
@winedarksea correct me if I am wrong
I am giving code snippets below with corresponding output
building and training the model
model=AutoTS(forecast_length=15,frequency='infer',ensemble='simple',
drop_data_older_than_periods=200,verbose=0)
model=model.fit(biocon,date_col='Date',value_col='Close',id_col=None)
forecasting
prediction=model.predict()
forecast=prediction.forecast
forecast.plot()
output of forecast
Exporting a template
example_filename = "example_export.csv" # .csv/.json
model.export_template(example_filename, models='best',
n=15, max_per_model_class=3)
on new training
model = AutoTS(forecast_length=15,
frequency='infer', max_generations=0,
num_validations=0, verbose=0)
model = model.import_template(example_filename, method='only') # method='add on'
to check the consistency I am running it for 10 times
forecast_list=[]
for i in range(10):
model.fit(biocon,date_col='Date',value_col='Close',id_col=None)
prediction=model.predict()
forecast=prediction.forecast
forecast_list.append(forecast)
plot the results of these runs
Conclusion
getting same result in the above 10 runs but it is not same with the result of the exported model
please let me know how to fix these
from autots.
I think I will up the default of max_generations
to 20 for the next package release.
from autots.
Related Issues (20)
- [Library Info] Multivariate forecasting HOT 4
- Future covariates HOT 1
- Adding regressors HOT 7
- Using autots model for predicting,not forecasting HOT 5
- Can't see 'Contour' metric result HOT 9
- 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
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.