https://github.com/nixtla/nixtla

TimeGPT-1: production ready pre-trained Time Series Foundation Model for forecasting and anomaly detection. Generative pretrained transformer for time series trained on over 100B data points. It's capable of accurately predicting various domains such as retail, electricity, finance, and IoT with just a few lines of code πŸš€.

https://github.com/nixtla/nixtla

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • β—‹
    CITATION.cff file
  • βœ“
    codemeta.json file
    Found codemeta.json file
  • βœ“
    .zenodo.json file
    Found .zenodo.json file
  • β—‹
    DOI references
  • βœ“
    Academic publication links
    Links to: arxiv.org
  • β—‹
    Committers with academic emails
  • β—‹
    Institutional organization owner
  • β—‹
    JOSS paper metadata
  • β—‹
    Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

anomaly-detection artificial-intelligence deep-learning forecasting generative-ai-time-series gpt gpts llm machine-learning time-series time-series-forecasting timegpt

Keywords from Contributors

prediction baselines ets exponential-smoothing fbprophet automl mstl naive arima neuralprophet
Last synced: 5 months ago · JSON representation

Repository

TimeGPT-1: production ready pre-trained Time Series Foundation Model for forecasting and anomaly detection. Generative pretrained transformer for time series trained on over 100B data points. It's capable of accurately predicting various domains such as retail, electricity, finance, and IoT with just a few lines of code πŸš€.

Basic Info
  • Host: GitHub
  • Owner: Nixtla
  • License: other
  • Language: Jupyter Notebook
  • Default Branch: main
  • Homepage: https://www.nixtla.io/docs
  • Size: 284 MB
Statistics
  • Stars: 2,904
  • Watchers: 34
  • Forks: 240
  • Open Issues: 57
  • Releases: 38
Topics
anomaly-detection artificial-intelligence deep-learning forecasting generative-ai-time-series gpt gpts llm machine-learning time-series time-series-forecasting timegpt
Created over 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

Nixtla   Tweet  Slack

TimeGPT-1

The first foundation model for forecasting and anomaly detection

[![CI](https://github.com/Nixtla/nixtla/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/Nixtla/nixtla/actions/workflows/ci.yaml) [![PyPi](https://img.shields.io/pypi/v/nixtla?color=blue)](https://pypi.org/project/nixtla/) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/Nixtla/nixtla/blob/main/LICENSE) [![docs](https://img.shields.io/website-up-down-green-red/http/docs.nixtla.io/.svg?label=docs)](https://docs.nixtla.io) [![Downloads](https://pepy.tech/badge/nixtla)](https://pepy.tech/project/nixtla) [![Downloads](https://pepy.tech/badge/nixtla/month)](https://pepy.tech/project/nixtla) [![Downloads](https://pepy.tech/badge/nixtla/week)](https://pepy.tech/project/nixtla) **TimeGPT** is a production ready, generative pretrained transformer for time series. It's capable of accurately predicting various domains such as retail, electricity, finance, and IoT with just a few lines of code πŸš€.

πŸš€ Quick Start

https://github.com/Nixtla/nixtla/assets/4086186/163ad9e6-7a16-44e1-b2e9-dab8a0b7b6b6

Install nixtla's SDK

python pip install nixtla>=0.7.0

Import libraries and load data

python import pandas as pd from nixtla import NixtlaClient

Forecast using TimeGPT in 3 easy steps

```python

Get your API Key at dashboard.nixtla.io

1. Instantiate the NixtlaClient

nixtlaclient = NixtlaClient(apikey = 'YOUR API KEY HERE')

2. Read historic electricity demand data

df = pd.read_csv('https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/electricity-short.csv')

3. Forecast the next 24 hours

fcstdf = nixtlaclient.forecast(df, h=24, level=[80, 90])

4. Plot your results (optional)

nixtlaclient.plot(df, fcstdf, level=[80, 90])

```

Forecast Results

Anomaly detection using TimeGPT in 3 easy steps

```python

Get your API Key at dashboard.nixtla.io

1. Instantiate the NixtlaClient

nixtlaclient = NixtlaClient(apikey = 'YOUR API KEY HERE')

2. Read Data # Wikipedia visits of NFL Star (

df = pd.read_csv('https://datasets-nixtla.s3.amazonaws.com/peyton-manning.csv')

3. Detect Anomalies

anomaliesdf = nixtlaclient.detectanomalies(df, timecol='timestamp', target_col='value', freq='D')

4. Plot your results (optional)

nixtlaclient.plot(df, anomaliesdf,timecol='timestamp', targetcol='value') ```

AnomalyDetection

πŸ€“ API support for other languages

Explore our API Reference to discover how to leverage TimeGPT across various programming languages including JavaScript, Go, and more.

πŸ”₯ Features and Capabilities

  • Zero-shot Inference: TimeGPT can generate forecasts and detect anomalies straight out of the box, requiring no prior training data. This allows for immediate deployment and quick insights from any time series data.

  • Fine-tuning: Enhance TimeGPT's capabilities by fine-tuning the model on your specific datasets, enabling the model to adapt to the nuances of your unique time series data and improving performance on tailored tasks.

  • API Access: Integrate TimeGPT seamlessly into your applications via our robust API. Upcoming support for Azure Studio will provide even more flexible integration options. Alternatively, deploy TimeGPT on your own infrastructure to maintain full control over your data and workflows.

  • Add Exogenous Variables: Incorporate additional variables that might influence your predictions to enhance forecast accuracy. (E.g. Special Dates, events or prices)

  • Multiple Series Forecasting: Simultaneously forecast multiple time series data, optimizing workflows and resources.

  • Custom Loss Function: Tailor the fine-tuning process with a custom loss function to meet specific performance metrics.

  • Cross Validation: Implement out of the box cross-validation techniques to ensure model robustness and generalizability.

  • Prediction Intervals: Provide intervals in your predictions to quantify uncertainty effectively.

  • Irregular Timestamps: Handle data with irregular timestamps, accommodating non-uniform interval series without preprocessing.

πŸ“š Documentation with examples and use cases

Dive into our comprehensive documentation to discover examples and practical use cases for TimeGPT. Our documentation covers a wide range of topics, including:

πŸ—žοΈ TimeGPT-1: Revolutionizing Forecasting and Anomaly Detection

Time series data is pivotal across various sectors, including finance, healthcare, meteorology, and social sciences. Whether it's monitoring ocean tides or tracking the Dow Jones's daily closing values, time series data is crucial for forecasting and decision-making.

Traditional analysis methods such as ARIMA, ETS, MSTL, Theta, CES, machine learning models like XGBoost and LightGBM, and deep learning approaches have been standard tools for analysts. However, TimeGPT introduces a paradigm shift with its standout performance, efficiency, and simplicity. Thanks to its zero-shot inference capability, TimeGPT streamlines the analytical process, making it accessible even to users with minimal coding experience.

TimeGPT is user-friendly and low-code, enabling users to upload their time series data and either generate forecasts or detect anomalies with just a single line of code. As the only foundation model for time series analysis out of the box, TimeGPT can be integrated via our public APIs, through Azure Studio (coming soon), or deployed on your own infrastructure.

βš™οΈ TimeGPT's Architecture

Self-attention, the revolutionary concept introduced by the paper β€œAttention is all you needβ€œ, is the basis of the this foundational model. The TimeGPT model is not based on any existing large language model(LLMs). It is independently trained on vast timeseries dataset as a large transformer model and is designed so as to minimize the forecasting error.

The architecture consists of an encoder-decoder structure with multiple layers, each with residual connections and layer normalization. Finally, a linear layer maps the decoder’s output to the forecasting window dimension. The general intuition is that attentionbased mechanisms are able to capture the diversity of past events and correctly extrapolate potential future distributions.

Arquitecture

TimeGPT was trained on, to our knowledge, the largest collection of publicly available time series, collectively encompassing over 100 billion data points. This training set incorporates time series from a broad array of domains, including finance, economics, demographics, healthcare, weather, IoT sensor data, energy, web traffic, sales, transport, and banking. Due to this diverse set of domains, the training dataset contains time series with a wide range of characteristics


⚑️ Zero-shot Results

Accuracy

TimeGPT has been tested for its zero-shot inference capabilities on more than 300K unique series, which involve using the model without additional fine-tuning on the test dataset. TimeGPT outperforms a comprehensive range of well-established statistical and cutting-edge deep learning models, consistently ranking among the top three performers across various frequencies.

Ease of use

TimeGPT also excels by offering simple and rapid predictions using a pre-trained model. This stands in stark contrast to other models that typically require an extensive training and prediction pipeline.

Results

Efficiency and Speed

For zero-shot inference, our internal tests recorded an average GPU inference speed of 0.6 milliseconds per series for TimeGPT, which nearly mirrors that of the simple Seasonal Naive.

πŸ“ How to cite?

If you find TimeGPT useful for your research, please consider citing the associated paper:

@misc{garza2023timegpt1, title={TimeGPT-1}, author={Azul Garza and Max Mergenthaler-Canseco}, year={2023}, eprint={2310.03589}, archivePrefix={arXiv}, primaryClass={cs.LG} }

πŸŽ‰ Features and Mentions

TimeGPT has been featured in many publications and has been recognized for its innovative approach to time series forecasting. Here are some of the features and mentions:

πŸ”– License

TimeGPT is closed source. However, this SDK is open source and available under the Apache 2.0 License. Feel free to contribute (check out the Contributing guide for more details).

πŸ“ž Get in touch

For any questions or feedback, please feel free to reach out to us at ops [at] nixtla.io.

Owner

  • Name: Nixtla
  • Login: Nixtla
  • Kind: organization
  • Email: ops@nixtla.io
  • Location: United States of America

Open Source Time Series Ecosystem

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 814
  • Total Committers: 24
  • Avg Commits per committer: 33.917
  • Development Distribution Score (DDS): 0.356
Past Year
  • Commits: 144
  • Committers: 14
  • Avg Commits per committer: 10.286
  • Development Distribution Score (DDS): 0.694
Top Committers
Name Email Commits
FedericoGarza f****z@g****m 524
JosΓ© Morales j****2@g****m 62
mergenthaler m****m@g****m 31
Olivier Sprangers 4****t 28
MMenchero m****o@g****m 28
Marco m****o@n****o 21
KielRodriguez k****0@g****m 16
Nikhil Gupta 3****3 16
dependabot[bot] 4****] 13
Yibei Hu 1****6 12
cristianchallu c****u@g****m 11
Tracy Teal t****l@g****m 11
allcontributors[bot] 4****] 10
fern-api 1****] 10
dsinghvi d****p@u****m 7
Eduardo LΓ³pez l****8@g****m 3
Han Wang g****n@g****m 3
Hahnbee Lee 5****e 2
Ubuntu u****u@i****l 1
Ubuntu u****u@i****l 1
Boje Deforce 7****e 1
Danny Sheridan 8****n 1
Eduardo Flores e****v@g****m 1
Michael Manganiello a****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 199
  • Total pull requests: 655
  • Average time to close issues: 4 months
  • Average time to close pull requests: 12 days
  • Total issue authors: 115
  • Total pull request authors: 36
  • Average comments per issue: 1.54
  • Average comments per pull request: 2.79
  • Merged pull requests: 481
  • Bot issues: 1
  • Bot pull requests: 70
Past Year
  • Issues: 56
  • Pull requests: 223
  • Average time to close issues: 15 days
  • Average time to close pull requests: 5 days
  • Issue authors: 29
  • Pull request authors: 17
  • Average comments per issue: 0.43
  • Average comments per pull request: 1.83
  • Merged pull requests: 167
  • Bot issues: 1
  • Bot pull requests: 30
Top Authors
Issue Authors
  • tracykteal (17)
  • AzulGarza (16)
  • ngupta23 (14)
  • FedericoGarza (11)
  • mergenthaler (10)
  • Yibei990826 (5)
  • fiksdano (3)
  • MMenchero (3)
  • sdmishra123 (3)
  • kestlermai (2)
  • Mohan16071996 (2)
  • kdgutier (2)
  • ben10ben (2)
  • elephaint (2)
  • Mzakery (2)
Pull Request Authors
  • AzulGarza (112)
  • jmoralez (106)
  • elephaint (60)
  • FedericoGarza (56)
  • marcopeix (47)
  • MMenchero (41)
  • dependabot[bot] (34)
  • ngupta23 (33)
  • tracykteal (32)
  • Yibei990826 (30)
  • fern-api[bot] (30)
  • mergenthaler (14)
  • loama (12)
  • goodwanghan (7)
  • allcontributors[bot] (5)
Top Labels
Issue Labels
feature (31) documentation (30) awaiting response (22) enhancement (21) bug (20) question (9) help wanted (7) fix (3) sweep (1) TEST (1) dependencies (1)
Pull Request Labels
documentation (81) dependencies (37) feature (35) fix (22) enhancement (12) breaking change (4) github_actions (3) bug (2) sweep (1)

Packages

  • Total packages: 5
  • Total downloads:
    • pypi 94,612 last-month
  • Total dependent packages: 3
    (may contain duplicates)
  • Total dependent repositories: 19
    (may contain duplicates)
  • Total versions: 127
  • Total maintainers: 2
pypi.org: nixtlats

Python SDK for Nixtla API (TimeGPT)

  • Versions: 35
  • Dependent Packages: 3
  • Dependent Repositories: 16
  • Downloads: 3,566 Last month
Rankings
Dependent packages count: 2.4%
Downloads: 2.4%
Stargazers count: 2.4%
Average: 3.3%
Dependent repos count: 3.6%
Forks count: 5.8%
Maintainers (2)
Last synced: 6 months ago
proxy.golang.org: github.com/Nixtla/nixtla
  • Versions: 36
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.6%
Dependent repos count: 6.8%
Last synced: 6 months ago
proxy.golang.org: github.com/nixtla/nixtla
  • Versions: 31
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.4%
Average: 6.6%
Dependent repos count: 6.8%
Last synced: about 1 year ago
pypi.org: autotimeseries

Scalable time series processing

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 66 Last month
Rankings
Stargazers count: 2.4%
Forks count: 5.8%
Dependent packages count: 10.1%
Average: 12.9%
Dependent repos count: 21.6%
Downloads: 24.4%
Maintainers (1)
Last synced: 7 months ago
pypi.org: nixtla

Python SDK for Nixtla API (TimeGPT)

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 2
  • Downloads: 90,980 Last month
Rankings
Dependent packages count: 10.1%
Dependent repos count: 11.5%
Downloads: 11.9%
Average: 14.6%
Stargazers count: 16.6%
Forks count: 22.7%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yaml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • mamba-org/provision-with-micromamba main composite
.github/workflows/python-publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • pypa/gh-action-pypi-publish 27b31702a0e7fc50959f5ad993c78deac1bdfc29 composite
setup.py pypi
  • requests *
.github/workflows/build-docs.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/deploy-readme.yaml actions
  • actions/checkout v2 composite
  • mamba-org/setup-micromamba v1 composite
  • readmeio/rdme v8 composite
.github/workflows/models-performance.yaml actions
  • actions/checkout v2 composite
  • actions/github-script v6 composite
  • mamba-org/setup-micromamba v1 composite
environment.yml conda
  • dask
  • jupyterlab
  • pandas
  • plotly
  • prophet
  • pyspark >=3.3