Skip to content

chulahlou/forecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forecasting with DeepAR

Overview

This project contains an SDK for building, training, and evaluating the DeepAR model provided by gluonts.

Installation

To get started, you can clone this project and run

python setup.py install

Usage

To initialize a forecasting object, issue the following:

from forecast import Forecast
f = Forecast()

You can then load one of the supported datasets as:

dataset_name = "<your-chosen-dataset>"
f.get_dataset(name=dataset_name)

Alternatively, you can initiate the forecaster with a dataset. Using the electricity dataset as an example, exec:

f = Forecast(dataset_name="electricity")

To configure both the DeepAR architecture and trainer, issue the command:

f.build_estimator(epochs=10, learning_rate=1e-3, num_batches_per_epoch=100, context_length=336)

Then, training and evaluation can be completed as:

f.train()
forecast, tss, metrics = f.eval()

To visualize the forecast:

f.visualize_forecast(forecast=forecast, tss=tss)

The forecast visualizations will appear in the figs directory.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors