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
1
vote
0 answers

How to create a weighted composite covariance function using GPML toolbox in MATLAB?

I'm trying to create a composite covariance function to model my data. Specifically I want to create a kernel which is weighted between @covSEard & @covRQard. For ex: I want to give a 30% weight to @covSEard & 70% to @covRQard, something like…
1
vote
1 answer

gpflow classification implementation

I want to implement a binary classification model using Gaussian process. According to the official documentation, I had the code as below. The X has 2048 features and Y is either 0 or 1. After optimizing the model, I was trying to evaluate the…
Hopkins
  • 59
  • 1
  • 6
1
vote
1 answer

How can I transfer parameters from one gpflow model to another to gain similar results?

Suppose I have a trained model m = gpflow.models.SVGP( likelihood=likelihood, kernel=kernel, inducing_variable=Z, num_data = len(X_train) ) is it possible to transfer its parameters to another model and achieve similar results? For…
Nourless
  • 729
  • 1
  • 5
  • 18
1
vote
1 answer

GPflow 2 custom kernel construction: fine upon construction, but kernel of size None in optimization

I'm creating some GPflow models in which I need the observations pre and post of a threshold x0 to be independent a priori. I could achieve this with just GP models, or with a ChangePoints kernel with infinite steepness, but both solutions don't…
Max
  • 13
  • 2
1
vote
0 answers

GP regression using Poisson likelihood

I am trying to implement GP regression using Poisson likelihood. I followed the example in GPy by doing poisson_likelihood = GPy.likelihoods.Poisson() laplace_inf = GPy.inference.latent_function_inference.Laplace() m = GPy.core.GP(X=X, Y=Y,…
Abhijith
  • 11
  • 1
1
vote
1 answer

Multi-class classification with softmax likelihood

The GPflow docs provide an example for multi-class classification with the robust-max function. I am trying to train a multi-class classifier with the softmax likelihood instead, which is also implemented in GPflow but I can't find any documentation…
Explicat
  • 1,075
  • 5
  • 16
  • 40
1
vote
1 answer

How to fix some dimensions of a kernel lengthscale in gpflow?

I have a 2d kernel, k = gpflow.kernels.RBF(lengthscales=[24*5,1e-5]) m = gpflow.models.GPR(data=(X,Y), kernel=k, mean_function=None) and I want to fix the lengthscale in the 2nd dimension, and just optimise the other. I can disable all lengthscale…
lionfish
  • 33
  • 4
1
vote
1 answer

How to build a Gaussian Process regression model for observations that are constrained to be positive

I'm currently trying to train a GP regression model in GPflow which will predict precipitation values given some meteorological inputs. I'm using a Linear+RBF+WhiteNoise kernel, which seems appropriate given the set of predictors I'm using. My…
Andrew Williams
  • 741
  • 8
  • 18
1
vote
2 answers

Custom Mean Function Construction for GPFlow Regression

I am trying to pass a custom mean function into GPflow 2.0. I have some (x,y,z) data with several observations for each x,y point. I wanted to pass the average z value for each (x,y) pair as the mean function. My code for the custom mean function…
vicky
  • 11
  • 1
1
vote
2 answers

Initial guesses for hyperparameters in GPflow

I've also asked this on the GPflow GitHub I found the initial guesses for hyperparameters by using m.likelihood.variance.assign(0.01) and m.kernel.lengthscales.assign(0.3) affects significantly to the final optimized hyperparameters. I was wondering…
Jie Wang
  • 11
  • 1
1
vote
2 answers

Strange `pickle`/`gpflow.utilities.freeze` behaviour with gpflow models

I have been trying to (crudely) train and save a gpflow SVGP model on a toy dataset largely following this notebook example Upon saving the model using pickle (I appreciate this is not recommended but I don't believe this is the main issue here), I…
KamKam
  • 546
  • 6
  • 14
1
vote
1 answer

gpflow matrix inversion error when doing regression

I am trying to adapt the gpflow GP regression example (https://gpflow.readthedocs.io/en/develop/notebooks/basics/regression.html) to my own data. I have 100 model runs, each with 10 parameters in an array: modelled_params (100,10). Each model then…
J. Ely
  • 21
  • 2
1
vote
1 answer

Does GPflow 2.0 support putting priors on (hyper)parameters of GPs?

I would like to put some prior on the (hyper)parameters of the GP models in GPflow, but I cannot find any module (like gpflow.priors) or doc about this issue. Besides, I noticed that prior is one of the arguments of the class parameter, together…
anqiyang
  • 27
  • 4
1
vote
1 answer

Which type of parameter the Adam optimizer in GPflow is working on, constrained or unconstrained?

In the document of GPflow like SVGP and natural gradient, the Adam optimizer in TensorFlow is used when it comes to training model parameters (lengthscale, variance, inducing inputs, etc) of the GP model using stochastic variational inference…
anqiyang
  • 27
  • 4
1
vote
1 answer

Why does a GPflow model not seem to learn anything with TensorFlow optimizers such as tf.optimizers.Adam?

My inducing points are set to trainable but do not change when I call opt.minimize(). Why is it and what does it mean? Does it mean, the model is not learning? What is the difference between tf.optimizers.Adam(lr) and gpflow.optimizers.Scipy? The…
irum
  • 41
  • 5
1 2
3
9 10