Skip to main content

Automated Time Series Forecasting

Project description

AutoTS

Model Selection for Multiple Time Series

Simple package for comparing and predicting with open-source time series implementations.

For other time series needs, check out the list here.

Features

  • Twenty available model classes, with tens of thousands of possible hyperparameter configurations
  • Finds optimal time series models by genetic programming
  • Handles univariate and multivariate/parallel time series
  • Point and probabilistic forecasts
  • Ability to handle messy data by learning optimal NaN imputation and outlier removal
  • Ability to add external known-in-advance regressor
  • Allows automatic ensembling of best models
  • Multiple cross validation options
  • Subsetting and weighting to improve search on many multivariate series
  • Option to use one or a combination of metrics for model selection
  • Import and export of templates allowing greater user customization

Installation

pip install autots

This includes dependencies for basic models, but additonal packages are required for some models and methods.

Basic Use

Input data is expected to come in either a long or a wide format:

  • The wide format is a pandas.DataFrame with a pandas.DatetimeIndex and each column a distinct series.
  • The long format has three columns:
    • Date (ideally already in pd.DateTime format)
    • Series ID. For a single time series, series_id can be = None.
    • Value
  • For long data, the column name for each of these is passed to .fit() as date_col, id_col, and value_col. No parameters are needed for wide data.
# also: _hourly, _daily, _weekly, or _yearly
from autots.datasets import load_monthly

df_long = load_monthly()

from autots import AutoTS

model = AutoTS(
    forecast_length=3,
    frequency='infer',
    prediction_interval=0.9,
    ensemble='all',
    model_list='superfast',
    max_generations=5,
    num_validations=2,
    validation_method='even',
)
model = model.fit(df_long, date_col='datetime', value_col='value', id_col='series_id')

# Print the details of the best model
print(model)

prediction = model.predict()
# point forecasts dataframe
forecasts_df = prediction.forecast
# accuracy of all tried model results
model_results = model.results()
# and aggregated from cross validation
validation_results = model.results("validation")

Check out extended_tutorial.md for a more detailed guide to features!

How to Contribute:

  • Give feedback on where you find the documentation confusing
  • Use AutoTS and...
    • Report errors and request features by adding Issues on GitHub
    • Posting the top model templates for your data (to help improve the starting templates)
    • Feel free to recommend different search grid parameters for your favorite models
  • And, of course, contributing to the codebase directly on GitHub!

Also known as Project CATS (Catlin's Automated Time Series) hence the logo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

AutoTS-0.2.7.tar.gz (369.0 kB view details)

Uploaded Source

Built Distribution

AutoTS-0.2.7-py3-none-any.whl (380.3 kB view details)

Uploaded Python 3

File details

Details for the file AutoTS-0.2.7.tar.gz.

File metadata

  • Download URL: AutoTS-0.2.7.tar.gz
  • Upload date:
  • Size: 369.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for AutoTS-0.2.7.tar.gz
Algorithm Hash digest
SHA256 0d57eeaccc64f277c5c3c42fc5ee4f67d9092165c02487bddb686d9d632402d1
MD5 38dacaf0c7f01a959a95202654f8036b
BLAKE2b-256 3b2330158bed1eb160288e831781f28edb151bbc1cc12ade14ee12d08da4319e

See more details on using hashes here.

Provenance

File details

Details for the file AutoTS-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: AutoTS-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 380.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for AutoTS-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e11ceef2b7cda3ecb6d9af895d67094ed68eaaa43f1336fccffebb347e23674b
MD5 a845c43bb1fb0303c4af8afe05d6f7b6
BLAKE2b-256 17226da3f837e74a96801a5cfef23e018fc9c88c00d04e6a0d5186f76f4f9339

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page