wesselb / neuralprocesses

A framework for composing Neural Processes in Python
https://wesselb.github.io/neuralprocesses
MIT License
76 stars 12 forks source link

Multi output time series example #19

Open josh0tt opened 8 months ago

josh0tt commented 8 months ago

I have a small time series dataset of size 500x10 (500 time steps, 10 features). I want to make predictions several time steps into the future conditioned on the first 4 features. For example, predict the other 6 features 100 steps ahead using knowledge of how the first 4 features will evolve.

I've managed to get a working version with OILMM and I'd like to compare it with Neural Process predictions, but having some trouble getting this up and running. Would you be able to provide an example?

wesselb commented 7 months ago

Hey @josh0tt!

Apologies for the slow reply. Last few weeks were busy!

I can definitely help you to get this up and running, but perhaps it is worthwhile to clarify a key difference between neural processes (NPs) and Gaussian processes (GPs).

Contrary to GPs, which are a typical supervised learning technique that can be applied to a single time series, neural processes are meta–learning models. Like GPs, when a NP is trained, it can make predictions for a single time series. However, unlike GPs, they must be trained on a collection of time series (a meta–data set).

In your example, you only have a single time series data set. This is unfortunately not enough to train a NP. You will need a breadth of related time series data sets that the NP can use to learn to make predictions for your single time series data set.

You have two options:

  1. Generate synthetic data sets, e.g. by sampling from a probabilistic model such as a MOGP.

  2. Find other real time series data sets which are similar in structure to your small time series data set.