toolset for time series forecasting
Project description
Introduction
tsts is an open-source easy-to-use toolset for time series forecasting.
Installation
pip install tsts
Time Series Forecasting?
Time series forecasting is the task to predict the values of the time series on Horizon given the values of the time series on Lookback Period. Note that data can be multivariate.
Available Modules
Following modules are supported.
Architectures | Losses | Metrics | Optimizers | Scalers | Schedulers |
|
|
|
|
|
|
Getting Started
Following example shows how to train a model on sine curve dataset. See Docs for the details.
Training
Without a log directory path provided by config, it automatically generates a random log directory.
import torch
from tsts.solvers import TimeSeriesForecaster
sin_dataset = torch.sin(torch.arange(0, 100, 0.1))
sin_dataset = sin_dataset.unsqueeze(-1)
forecaster = TimeSeriesForecaster()
forecaster.fit([sin_dataset])
Inference
For inference, it needs to load parameters from a log directory generated in training.
# inference.yml
LOGGER:
LOG_DIR: "log directory generated in training"
import torch
from tsts.solvers import TimeSeriesForecaster
X = torch.sin(torch.arange(0.0, 10.0, 0.1)).unsqueeze(1)
forecaster = TimeSeriesForecaster("inference.yml")
forecaster.predict(X)
Examples
See Benchmark for advanced usage.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.