ETNA Time Series Library
ETNA is an easy-to-use time series forecasting framework. It includes built in toolkits for time series preprocessing, feature generation, a variety of predictive models with unified interface - from classic machine learning to SOTA neural networks, models combination methods and smart backtesting. ETNA is designed to make working with time series simple, productive, and fun.
ETNA is the first python open source framework of Tinkoff.ru Artificial Intelligence Center. The library started as an internal product in our company - we use it in over 10+ projects now, so we often release updates. Contributions are welcome - check our Contribution Guide.
ETNA is on PyPI, so you can use
pip to install it.
pip install --upgrade pip pip install etna-ts
Here's some example code for a quick start.
import pandas as pd from etna.datasets.tsdataset import TSDataset from etna.models import ProphetModel # Read the data df = pd.read_csv("example_dataset.csv") df["timestamp"] = pd.to_datetime(df["timestamp"]) # Create a TSDataset df = TSDataset.to_dataset(df) ts = TSDataset(df,freq='1d') # Choose a horizon HORIZON = 8 # Fit the model model = ProphetModel() model.fit(ts) # Make the forecast future_ts = ts.make_future(HORIZON) forecast_ts = model.forecast(future_ts)
We have also prepared a set of tutorials for an easy introduction:
01. Get started
- Creating TSDataset and time series plotting
- Forecast single time series - Simple forecast, Prophet, Catboost
- Forecast multiple time series
- What is backtest and how it works
- How to run a validation
- Validation visualisation
- Partial autocorrelation
- Median method
- Density method
ETNA documentation is available here.