question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorporating additional data to train gp_model

See original GitHub issue

Hi,

I have a few questions regarding the incorporation of additional data to train the existing gp_model. As GP is a nonparametric algorithm which can learn as the data grows. Is there a way to incorporate additional data in gpytorch to update the hyperparameters without recalculating again using the whole data. I found two methods in GPyTorch which seems to be related to that :

get_fantasy_data() - problem with this is that the method is not available for multitask GPs set_train_data() My query is regarding the second method; in documentation, it is given that the function doesn’t refit the hyperparameter. Does that mean it doesn’t update the hyperparameters at all?

Thanks in advance!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
gpleisscommented, Apr 15, 2019

The hyperparameters don’t have to be updated when you add new data. Updating them will give your model a better fit, but comes at the cost of additional computation.

GPyTorch doesn’t fit the hyperparameters of GP models automatically - you have to write the optimization loop yourself (as seen in our examples). You should:

  • Condition your model on new data using set_train_data (and include the new data + all your old data)
  • Re-run the training loop (if you want to update the hyperparameters)

However, you may find for your particular application that the hyperparameters don’t vary too much with new data - and it might make more sense to sparingly update the hyperparameters.

1reaction
Balandatcommented, Sep 8, 2020

That’s not easily possible with the same likelihood (the default one is homoskedastic). You could instead use a FixedNoiseGaussianLikelihood where you instantiate the first part of the vector of noises to the inferred noise level of your model and set the other ones to a very small noise level.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Update Neural Network Models With More Data
Retraining Update Strategies. A benefit of neural network models is that their weights can be updated at any time with continued training. When ......
Read more >
GP Regression with Grid Structured Training Data
In this notebook, we demonstrate how to perform GP regression when your training data lies on a regularly spaced grid. For this example,...
Read more >
Implement A Gaussian Process From Scratch | by Shuai Guo
The following code trains a GP model and makes predictions on a grid of test data. It is common to scale the GP...
Read more >
Is there a way to incorporate new data into an already trained ...
It arises because as optimizers get more efficient, the neural network ... If in the future you feed it a bunch of data...
Read more >
incorporating prior knowledge into gaussian process models
Another potentially useful attribute of GP model is the possibility to incorporate prior knowl- ... Based on a set of N training data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found