2019-11-02 14:48:14 +08:00
2019-11-02 14:48:08 +08:00
2019-11-02 14:48:14 +08:00
2019-11-02 14:48:14 +08:00
2019-11-02 11:50:46 +08:00
2019-11-02 14:48:14 +08:00
2019-11-02 14:48:14 +08:00
2019-11-02 14:48:14 +08:00
2019-11-02 14:48:14 +08:00

Using attentive neural process for forecasting smartmeter data in pytorch

Changes for stability:

  • in eval mode, take mean of latent space, and mean output, don't sample
  • use log_variance where possible
    • and add a minimum bound to std (in log domain) to avoid mode collapse
  • use pytorch attention (which has dropout)
  • use batchnorm and dropout on channel dimensions
  • added log_prob loss
  • check and skip nonfinite values because for extreme inputs we can still get nan's

Usage:

Example outputs:

Here the black dots are input data, the dotted line is the true data. The blue line is the prediction, and the blue shadow is the uncertainty.

See also:

S
Description
implementing "recurrent attentive neural processes" to forecast power usage (w. LSTM baseline, MCDropout)
Readme
415 MiB
Languages
Jupyter Notebook 98.7%
Python 1.3%