Giter Club home page Giter Club logo

deeptcn's Introduction

Probabilistic Forecasting with Temporal Convolutional Neural Network

This notebook accompanies the paper, "Probabilistic Forecasting with Temporal Convolutional Neural Network" by Yitian Chen, Yanfei Kang, Yixiong Chen, and Zizhuo Wang published at KDD 2019 ,Workshop on Mining and Learning from Time Series

The notebook provides Mxnet codes for the proposed model on the three public datasets, traffic, electricity and parts.

It is worth noting that we use the same model trained on the data before the first prediction window rather than retraining the model after updating the forecasts. A rolling-window updating forecasts can acheive higher metrics accuracy.

Parameters of deepTCN models

  • inputSize: the length of input sequences. The 'inputSize' should be compatible with the preprocessing codes.
  • outputSize: the length of output sequences. The 'ouputSize' should be compatible with the preprocessing codes. E.g., in the traffic datasets, we choose inputSize=168, outputSize=24.
  • dilations: dilations of causal convolution nets, this mainly based on the inputSize, e.g, [1,2,4,8, 16, 32] for the traffic dataset in my implementation.
  • nResidue: we assume the input is a tensor of "batchSize, length, feature-dimension". nResidue is the number of feature-dimensions of the final input.

Parameters of the trainer

  • Loss function:
    • For point forecasting, Try L1,L2 or Huber Loss
    • For probabilistic forecasting with Quantile regression, you can try quantileLoss with different qunantile point.
    • Users can also construct your loss function based on different distribution assumptions (e.g., Gaussian likelihood)

Experiments on the traffic dataset

Data preprocessing
  • Download the dataset from UCI Machine Learning Repository: https://archive.ics.uci.edu/ml/datasets/PEMS-SF
  • Run "R CMD BATCH traffic/basicPreprocess.R" to generate "traffic.csv".
  • python3 traffic/trafficModelPrepare.py to generate the "trafficPrepare.pkl" for model training.
Point forecasting
  • python3 traffic/trafficPointHuber.py
Probabilistic forecasting based on quantile regression
  • python3 traffic/trafficQuantileForecast.py
Probabilistic forecasting based on Gaussian likelihood
  • python3 traffic/trafficGaussianForecast.py

Experiments on the ec dataset

Data preprocessing
Point forecasting
  • python3 ec/ecPointHuber.py
Probabilistic forecasting based on quantile regression
  • python3 ec/ecQuantileForecast.py
Probabilistic forecasting based on Gaussian likelihood
  • python3 ec/ecGaussianForecast.py

Experiments on the parts dataset

Data preprocessing
Probabilistic forecasting based on quantile regression
  • python3 parts/partsQuantileForecast.py
Probabilistic forecasting based on Gaussian likelihood
  • python3 parts/partsGaussianForecast.py

deeptcn's People

Contributors

oneday88 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.