Home

Awesome

<h1 id="auto-ts">Auto_TS: Auto_TimeSeries</h1> <p style="font-family:verdana">Automatically build multiple Time Series models using a Single Line of Code. Now updated with Dask.

auto-ts

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.

Table of Contents

<ul> <li><a href="#Latest">Latest updates</a></li> <li><a href="#Citation">Citation</a></li> <li><a href="#introduction">What is auto_ts</a></li> <li><a href="#install">How to install auto_ts</a></li> <li><a href="#usage">Usage</a></li> <li><a href="#requirements">Requirements</a></li> <li><a href="#tips">Tips</a></li> <li><a href="#license">License</a></li> <li><a href="#copyright">Copyright</a></li> <li><a href="#disclaimer">Disclaimer</a></li> </ul>

Latest

If you are looking for the latest and greatest updates about our library, check out our updates page. <br>

Citation

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"

<h2 id="introduction">Introduction</h2>

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).

Install

pip install auto-ts

Use pip3 install auto-ts if the above doesn’t work

pip install git+https://github.com/AutoViML/Auto_TS.git

Installing on Colab

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

auto_ts_colab

Installing on Windows

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-ts
<h2 id="usage">Usage</h2>

First you need to import auto_timeseries from auto_ts library:<br>

from auto_ts import auto_timeseries

Second, 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:

WARNING: "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:

The next step after training the model object is to make some predictions with test data:

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

<h2 id="requirements">Requirements</h2> dask, scikit-learn, prophet, statsmodels, pmdarima, XGBoost <h2 id="license">License:</h2> Apache License 2.0 <h2 id="Tips">Tips</h2> <h2 id="disclaimer">DISCLAIMER:</h2>

This is not an Officially supported Google project.

<h2 id="copyright">Copyright</h2>

© Google