Automatically build multiple Time Series models using a Single Line of Code. Now updated with Dask.
auto_timeseries
is a complex model building utility for time series data. Since it automates many Tasks involved in a complex endeavor, it assumes many intelligent defaults. But you can change them. Auto_Timeseries will rapidly build predictive models based on Statsmodels ARIMA, Seasonal ARIMA, Prophet and Scikit-Learn ML. It will automatically select the best model which gives best score specified.
If you are looking for the latest and greatest updates about our library, check out our updates page.
If you use Auto_TS in your research project or paper, please use the following format for citations:
"Seshadri, Ram (2020). GitHub - AutoViML/Auto_TS: enables you to build and deploy multiple time series models using ML and statistical techniques with a single line of code. Source code: https://github.com/AutoViML/Auto_TS"
Auto_TS (Auto_TimeSeries) enables you to build and select multiple time series models using techniques such as ARIMA, SARIMAX, VAR, decomposable (trend+seasonality+holidays) models, and ensemble machine learning models.
Auto_TimeSeries is an Automated ML library for time series data. Auto_TimeSeries was initially conceived and developed by Ram Seshadri and was significantly expanded in functionality and scope and upgraded to its present status by Nikhil Gupta.
auto-ts.Auto_TimeSeries is the main function that you will call with your train data. You can then choose what kind of models you want: stats, ml or Prophet based model. You can also tell it to automatically select the best model based on the scoring parameter you want it to be based on. It will return the best model and a dictionary containing predictions for the number of forecast_periods you mentioned (default=2).
Use pip3 install auto-ts
if the above doesn’t work
pip install git+https://github.com/AutoViML/Auto_TS.git
If you are using Colab or Kaggle kernel and want to install auto_ts, please use the following steps (otherwise you will get an error!):
!pip install auto-ts --no-deps --ignore-installed
!pip install 'fsspec>=0.3.3'
!pip install statsmodels --upgrade
!pip install pmdarima
Windows users may experience difficulties with the Prophet and pystan dependency installations. Because of this, we recommend installing Prophet using instructions from the Prophet documentation page prior to installing auto-ts. For Anaconda users, this can be accomplished via:
conda install -c conda-forge prophet pip install auto-tsFirst you need to import auto_timeseries from auto_ts library:
from auto_ts import auto_timeseriesSecond, Initialize an auto_timeseries model object which will hold all your parameters:
model = auto_timeseries( score_type='rmse', time_interval='Month', non_seasonal_pdq=None, seasonality=False, seasonal_period=12, model_type=['Prophet'], verbose=2, )Here are how the input parameters defined:
Hence, please note that these are the list of allowed aliases for frequency: ['B','C','D','W','M','SM','BM','CBM', 'MS','SMS','BMS','CBMS','Q','BQ','QS','BQS', 'A,Y','BA,BY','AS,YS','BAS,BYS','BH', 'H','T,min','S','L,ms','U,us','N']
For a start, you can test the following codes for your data and see how the results are (or you can leave it as None and auto_timeseries will try and impute it for you):
'MS', 'M', 'SM', 'BM', 'CBM', 'SMS', 'BMS'
for monthly frequency data'D', 'B', 'C'
for daily frequency data'W'
for weekly frequency data'Q', 'BQ', 'QS', 'BQS'
for quarterly frequency data'A,Y', 'BA,BY', 'AS,YS', 'BAS,YAS'
for yearly frequency data'BH', 'H', 'h'
for hourly frequency data'T,min'
for minute frequency data'S', 'L,milliseconds', 'U,microseconds', 'N,nanoseconds'
for second frequency datamax_p = 3, max_d = 1, max_q = 3
. Type is Tuple.'best', 'prophet', 'stats', 'ARIMA', 'SARIMAX', 'VAR', 'ML'
.
"prophet"
will build a model using Prophet -> this means you must have Prophet installed"stats"
will build statsmodels based ARIMA, SARIMAX and VAR models"ML"
will build a machine learning model using Random Forests provided explanatory vars are given"best"
will try to build all models and pick the best oneWARNING: "best" might take some time for large data sets. We recommend that you choose a small sample from your data set before attempting to run entire data.
The next step after defining the model object is to fit it with some real data:model.fit( traindata=train_data, ts_column=ts_column, target=target, cv=5, sep="," )
Here are how the parameters defined:
predictions = model.predict( testdata = ..., # can be either a dataframe or an integer standing for the forecast_period, model = 'best' # or any other string that stands for the trained model )
Here are how the parameters are defined. You can choose to send either testdata in the form of a dataframe or send in an integer to decide how many periods you want to forecast. You need only
seasonal_PDQ = (2,1,2)
and non_seasonal_pdq = (0,0,3)
. It will accept only tuples. The default is None and Auto_Timeseries will automatically search for the best p,d,q (for Non Seasonal) and P, D, Q (for Seasonal) orders by searching for all parameters from 0 to 12 for each value of p,d,q and 0-3 for each P, Q and 0-1 for D.This is not an Officially supported Google project.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4