Questions tagged [gpflow]

GPflow is a package for building Gaussian process models in Python, using TensorFlow.

GPflow implements modern Gaussian process inference for composable kernels and likelihoods.

GPflow uses TensorFlow for running computations, which allows fast execution on GPUs, and uses Python 3.5 or above.

140 questions
2
votes
1 answer

Difference between SVGP and SGPMC implementation

As far as the SGPMC paper[1] goes, the pretraining should be pretty much identical to SVGP. However, the implementations (current dev version) differ a bit, and I'm having some problems understanding everything (especially what happens with the…
Fabricio
  • 148
  • 1
  • 11
2
votes
1 answer

optimization in gpflow 2: Why set autograph=False?

in the current notebook tutorials (gpflow 2.0), all @tf.function tags include the option autograph=False, e.g. (https://gpflow.readthedocs.io/en/2.0.0-rc1/notebooks/advanced/gps_for_big_data.html): @tf.function(autograph=False) def…
Fabricio
  • 148
  • 1
  • 11
2
votes
2 answers

Bounding hyperparameter optimization with Tensorflow bijector chain in GPflow 2.0

While doing GP regression in GPflow 2.0, I want to set hard bounds on lengthscale (i.e. limiting lengthscale optimization range). Following this thread (Setting hyperparameter optimization bounds in GPflow 2.0), I constructed a TensorFlow Bijector…
2
votes
1 answer

Likelihoods combining multiple latent GPs in GPflow

I am trying to implement Variational Heteroscedastic Gaussian Process Regression in GPFlow. My idea is to use the Variational Sparse Gaussian Process model (gpflow.models.SVGP) with a custom built Likelihood which expresses the density of y given…
gustavocmv
  • 41
  • 5
2
votes
0 answers

SVGP for US Flight data

My problem is the optimization issue for SVIGP in the US Flight dataset. I implemented the SVGP model for the US flight data mentioned in the Hensman 2014 using the number of inducing point = 100, batch_size = 1000, learning rate = 1e-5 and maxiter…
Rui Meng
  • 21
  • 3
2
votes
2 answers

Clear up memory in python loop after creating a model

I am running a for loop in python where each loop is required to create a model on different data (an extract is shown below). The model created each time is not erased from memory resulting in slowing down each loop. import gc for s in range(0,…
prax1telis
  • 297
  • 2
  • 12
2
votes
1 answer

Restoring GPflow Model with Mean Function doesn't work

I have been following the methodology of saving/restoring GPflow models with success. But now I've run into a snag. When I try to restore a model with a Linear mean function, the restore crashes with an error. I think that the issue comes in the…
dgilford
  • 23
  • 2
2
votes
1 answer

How can I print output (tensor values, shapes) in gpflow?

I am trying to develop a new model within gpflow. In order to debug it I need to know shapes and values of tensors during execution of the graph. I tried the below based on printing tensor values in tensorflow, but nothing is printed to the…
Jonathan
  • 123
  • 6
2
votes
1 answer

Gaussian process regressions estimates of confidence intervals

This may be an odd question, but when Gaussian process regressions see a bunch of noisy data without much of a signal, what do they do? Below I take a bunch of noisy data and run two different implementations of GPR and they both produce super tiny…
rprog
  • 1,980
  • 1
  • 12
  • 8
2
votes
1 answer

PCA computed by GPflow and Sklearn doesn't match

I am performing PCA analysis by using Sklearn and GPflow. I noticed that the output returned by both the libraries doesn't match. Please see below the sample code snippet- import numpy as np from gpflow.models import PCA_reduce from…
ravi
  • 6,140
  • 18
  • 77
  • 154
2
votes
0 answers

Constraint optimization in TensorFlow (or GPFlow)

An example is the following: The goal is to optimize a function f(x1,..,xN) subject to the constraint x1 + .. + xN = 1 with 0 < x_i <= 1. How do I do this with tensorflow in general (with arbitrary constraints)? I have seen the…
Maximilian Mordig
  • 1,333
  • 1
  • 12
  • 16
1
vote
1 answer

GPflow 2: VGP model with MOK and multiple-input throws ValueError

I'm following the multi-output kernel notebook of GPflow 2.5.2 documentation. I try to replace the SVGP model by either VGP or GPR model because I have only little data and do not need the sparse aspect. I'm using the SharedIndependent multi-output…
tamara d
  • 320
  • 5
  • 18
1
vote
1 answer

'GPR' object has no attribute 'X'

I am trying to run the code from https://github.com/befelix/safe_learning/blob/master/examples/1d_example.ipynb . This code is written for gpflow version 0.4.0. I want to update this code for gpflow version 2.5.2. I changed the following line gp =…
valli
  • 43
  • 3
1
vote
0 answers

GPFlow model gives bad predictions on test set

Good day! I was using GPFlow regression to model function on a sphere (spherical distance between point and North Pole). Here is my code: model = gpflow.models.GPR(data=(nodes_train, fs_train), kernel=kernel,…
Alexander
  • 33
  • 6
1
vote
1 answer

How can I compile batched training of a gpflow GPR into a tf.function?

I need to train a GPR model in multiple batches per epoch using a custom loss function. I would like to do this using GPflow and I would like to compile my training using tf.function to increase the efficiency. However, gpflow.GPR must be…
partyphysics
  • 175
  • 7
1
2
3
9 10