# \#gaussian-process

**URL:** https://discourse.julialang.org/tag/gaussian-process/433.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Good practices regarding automatic differentiation in a Gaussian process implementation](https://discourse.julialang.org/t/good-practices-regarding-automatic-differentiation-in-a-gaussian-process-implementation/135990)

<div class="topic-metadata">

**Author:** [@Nikos\_Gianniotis](https://discourse.julialang.org/u/Nikos_Gianniotis)\
**Replies:** 14\
**Last updated:** [March 5, 2026, 8:48am UTC](https://discourse.julialang.org/t/good-practices-regarding-automatic-differentiation-in-a-gaussian-process-implementation/135990 "2026-03-05T08:48:10Z")

</div>

(Related to Large memory consumption when using Mooncake via DifferentiationInterface for Gaussian process optimisation) I’m starting this thread to discuss good practices for using Mooncake.jl via DifferentiationInterf…

---

## [Fastest way to sample from MVN, changing parameters](https://discourse.julialang.org/t/fastest-way-to-sample-from-mvn-changing-parameters/128145)

<div class="topic-metadata">

**Author:** [@Daniel\_Johansson](https://discourse.julialang.org/u/Daniel_Johansson)\
**Replies:** 7\
**Last updated:** [May 3, 2025, 4:11pm UTC](https://discourse.julialang.org/t/fastest-way-to-sample-from-mvn-changing-parameters/128145 "2025-05-03T16:11:23Z")

</div>

Hey guys! Does anybody know what is the most efficient way of sampling from a multivariate normal distribution whose parameters are constantly updated. I’m constructing a Gibbs sampler for a MVN whose parameters depend …

---

## [Large memory consumption when using Mooncake via DifferentiationInterface for Gaussian process optimisation](https://discourse.julialang.org/t/large-memory-consumption-when-using-mooncake-via-differentiationinterface-for-gaussian-process-optimisation/127289)

<div class="topic-metadata">

**Author:** [@Nikos\_Gianniotis](https://discourse.julialang.org/u/Nikos_Gianniotis)\
**Replies:** 19\
**Last updated:** [April 15, 2025, 7:20am UTC](https://discourse.julialang.org/t/large-memory-consumption-when-using-mooncake-via-differentiationinterface-for-gaussian-process-optimisation/127289 "2025-04-15T07:20:30Z")

</div>

Hello everyone, I am working on a model called the Gaussian process latent variable model (GPLVM). The GPLVM is a dimensionality reduction method which given a high dimensional dataset Y will return low-dimensional proj…

---

## [Excessive memory consumption when optimising Gaussian process regression with automatic reverse differentiation](https://discourse.julialang.org/t/excessive-memory-consumption-when-optimising-gaussian-process-regression-with-automatic-reverse-differentiation/127772)

<div class="topic-metadata">

**Author:** [@Nikos\_Gianniotis](https://discourse.julialang.org/u/Nikos_Gianniotis)\
**Replies:** 2\
**Last updated:** [April 7, 2025, 6:27am UTC](https://discourse.julialang.org/t/excessive-memory-consumption-when-optimising-gaussian-process-regression-with-automatic-reverse-differentiation/127772 "2025-04-07T06:27:01Z")

</div>

I am working on a model involving Gaussian processes and I am optimising it using Optim.jl while obtaining gradients via DifferentiationInterface.jl. Unfortunately, when I run the code, the top utility informs me that th…

---

## [Zygote.gradient does not work with AbstractGPs.CustomMean](https://discourse.julialang.org/t/zygote-gradient-does-not-work-with-abstractgps-custommean/87815)

<div class="topic-metadata">

**Author:** [@soldasim](https://discourse.julialang.org/u/soldasim)\
**Replies:** 9\
**Last updated:** [August 1, 2024, 6:06am UTC](https://discourse.julialang.org/t/zygote-gradient-does-not-work-with-abstractgps-custommean/87815 "2024-08-01T06:06:37Z")

</div>

Hello, I am trying to use an AbstractGPs.FiniteGP with Turing and I am having problems with Zygote.gradient calculation of the GP hyperparameters. For some reason, Zygote fails to calculate the gradient when using an Ab…

---

## [Choice of Kernel Function (MultiOutput Gaussian Process)](https://discourse.julialang.org/t/choice-of-kernel-function-multioutput-gaussian-process/101359)

<div class="topic-metadata">

**Author:** [@lsablon](https://discourse.julialang.org/u/lsablon)\
**Replies:** 0\
**Last updated:** [July 8, 2023, 6:55pm UTC](https://discourse.julialang.org/t/choice-of-kernel-function-multioutput-gaussian-process/101359 "2023-07-08T18:55:35Z")

</div>

Hi ! I am using Gaussian Processes in my research, but I lack some theoretical knowledge about multioutput kernels. For the moment, I am using the JuliaGaussianProcesses ecosystem. My training data are maps associated…

---

## [GPs: sum of independent Kernels](https://discourse.julialang.org/t/gps-sum-of-independent-kernels/98542)

<div class="topic-metadata">

**Author:** [@martincornejo](https://discourse.julialang.org/u/martincornejo)\
**Replies:** 2\
**Last updated:** [May 10, 2023, 8:00am UTC](https://discourse.julialang.org/t/gps-sum-of-independent-kernels/98542 "2023-05-10T08:00:58Z")

</div>

The documentation of KernelFunctions.jl specifies many building blocks to define composite Kernels. But I can’t find a way to build a sum of independent Kernels, something similar to the KernelTensorProduct but with addi…

---

## [Probabilistic forecasting for spatio-temporal raster data](https://discourse.julialang.org/t/probabilistic-forecasting-for-spatio-temporal-raster-data/98436)

<div class="topic-metadata">

**Author:** [@microlifecc](https://discourse.julialang.org/u/microlifecc)\
**Replies:** 2\
**Last updated:** [May 7, 2023, 6:44pm UTC](https://discourse.julialang.org/t/probabilistic-forecasting-for-spatio-temporal-raster-data/98436 "2023-05-07T18:44:19Z")

</div>

We have a time series gridded/ratser panel dataset (spatio-temporal). The dataset is in 3D, where each ((x, y, t), where x and y ranges from 1-25 while t ranges from 1-1800 though we’re trying to predict just the next ti…

---

## [Multi output Gaussian Process package?](https://discourse.julialang.org/t/multi-output-gaussian-process-package/95335)

<div class="topic-metadata">

**Author:** [@lsablon](https://discourse.julialang.org/u/lsablon)\
**Replies:** 3\
**Last updated:** [February 28, 2023, 4:00pm UTC](https://discourse.julialang.org/t/multi-output-gaussian-process-package/95335 "2023-02-28T16:00:54Z")

</div>

Hello, I am attempting to predict temperatures on a grid using a small dataset. Based on my research, I believe that Gaussian Processes would be the most effective approach. However, I am having trouble finding a packag…

---

## [Is there a package for Derivative Observations](https://discourse.julialang.org/t/is-there-a-package-for-derivative-observations/88013)

<div class="topic-metadata">

**Author:** [@zdc063](https://discourse.julialang.org/u/zdc063)\
**Replies:** 0\
**Last updated:** [September 29, 2022, 10:27pm UTC](https://discourse.julialang.org/t/is-there-a-package-for-derivative-observations/88013 "2022-09-29T22:27:37Z")

</div>

Hello everyone, It is well known that observations on derivatives can be used to train GP. (e.g. https://proceedings.neurips.cc/paper/2002/file/5b8e4fd39d9786228649a8a8bec4e008-Paper.pdf) I wonder whether there is any e…

---

## [A minimal CUDA-compatible and differentiable GP implementation](https://discourse.julialang.org/t/a-minimal-cuda-compatible-and-differentiable-gp-implementation/80099)

<div class="topic-metadata">

**Author:** [@Red-Portal](https://discourse.julialang.org/u/Red-Portal)\
**Replies:** 11\
**Last updated:** [June 9, 2022, 3:22pm UTC](https://discourse.julialang.org/t/a-minimal-cuda-compatible-and-differentiable-gp-implementation/80099 "2022-06-09T15:22:07Z")

</div>

Hi folks, I was really frustrated last week because it seems there isn’t a way to implement Gaussian processes with both CUDA acceleration and differentiation. Because of this, I had to roll my own CUDA kernels that did…

---

## [Bayesian regression with parametrized basis functions in Turing.jl](https://discourse.julialang.org/t/bayesian-regression-with-parametrized-basis-functions-in-turing-jl/71725)

<div class="topic-metadata">

**Author:** [@mvsoom](https://discourse.julialang.org/u/mvsoom)\
**Replies:** 7\
**Last updated:** [April 19, 2022, 5:55pm UTC](https://discourse.julialang.org/t/bayesian-regression-with-parametrized-basis-functions-in-turing-jl/71725 "2022-04-19T17:55:14Z")

</div>

I’m trying to migrate a simple Bayesian model handwritten in Python to Turing.jl for a more modern approach. The model is a classical parametrized basis function expansion: a 1D (speech) signal f(t) is expanded into par…

---

## [Trying to sample my Gaussian Process with MCMC](https://discourse.julialang.org/t/trying-to-sample-my-gaussian-process-with-mcmc/78342)

<div class="topic-metadata">

**Author:** [@mirror63](https://discourse.julialang.org/u/mirror63)\
**Replies:** 1\
**Last updated:** [March 23, 2022, 7:02pm UTC](https://discourse.julialang.org/t/trying-to-sample-my-gaussian-process-with-mcmc/78342 "2022-03-23T19:02:36Z")

</div>

Hello I am using GuassianProcessess.jl, I have been looking at their tutorial (Simple GP Regression · GaussianProcesses.jl) and implement it. Likewise, I want to implement a kernel with summing its value. Now I would lik…

---

## [Modeling gaussian process with Turing.jl](https://discourse.julialang.org/t/modeling-gaussian-process-with-turing-jl/76001)

<div class="topic-metadata">

**Author:** [@RickandMortyforever](https://discourse.julialang.org/u/RickandMortyforever)\
**Replies:** 6\
**Last updated:** [February 8, 2022, 11:08am UTC](https://discourse.julialang.org/t/modeling-gaussian-process-with-turing-jl/76001 "2022-02-08T11:08:42Z")

</div>

Hi, I was trying to build a gaussian process model with Turing.jl I’ve read Gaussianprocesses.jl and Stheno.jl. They must be good. But for the purpose of learning, I’d like to go through step by step in frame of Turing…

---

## [Random variables from one uniform distribution get added to create new rand var](https://discourse.julialang.org/t/random-variables-from-one-uniform-distribution-get-added-to-create-new-rand-var/71529)

<div class="topic-metadata">

**Author:** [@RexXI](https://discourse.julialang.org/u/RexXI)\
**Replies:** 4\
**Last updated:** [November 16, 2021, 11:08am UTC](https://discourse.julialang.org/t/random-variables-from-one-uniform-distribution-get-added-to-create-new-rand-var/71529 "2021-11-16T11:08:39Z")

</div>

Hi, all. I’m attempting to model what happens when random variables from one distribution, specifically a uniform distribution, get added to create a new random variable. To begin with begin ua = 2.0.\*rand(10000) .-…

---

## [Weights in gaussian process](https://discourse.julialang.org/t/weights-in-gaussian-process/70646)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 7\
**Last updated:** [November 4, 2021, 1:51pm UTC](https://discourse.julialang.org/t/weights-in-gaussian-process/70646 "2021-11-04T13:51:07Z")

</div>

I have a model like @willtebbutt’s TemporalGPs example https://github.com/JuliaGaussianProcesses/TemporalGPs.jl#learning-kernel-parameters-with-optimjl-parameterhandlingjl-and-zygotejl In my dataset, different observati…

---

## [Extracting the posterior mean and covariance from the object created by "GP" in GaussianProcesses.jl](https://discourse.julialang.org/t/extracting-the-posterior-mean-and-covariance-from-the-object-created-by-gp-in-gaussianprocesses-jl/70543)

<div class="topic-metadata">

**Author:** [@path-doc](https://discourse.julialang.org/u/path-doc)\
**Replies:** 0\
**Last updated:** [October 28, 2021, 10:21am UTC](https://discourse.julialang.org/t/extracting-the-posterior-mean-and-covariance-from-the-object-created-by-gp-in-gaussianprocesses-jl/70543 "2021-10-28T10:21:24Z")

</div>

As part of a broader Value Function Iteration exercise, I wish to feed the output of predictMVN or predict\_f back into an instantiation of GP. Eg. Suppose we have created an instance gp by feeding GP the usual ingredi…

---

## [Using TemporalGPs](https://discourse.julialang.org/t/using-temporalgps/63208)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 9:03am UTC](https://discourse.julialang.org/t/using-temporalgps/63208 "2021-06-21T09:03:48Z")

</div>

@willtebbutt I have this working code using Stheno using Stheno.AbstractGPs using CairoMakie const l1 = 0.4 const s1 = 0.2 f = let gpc = Stheno.GPC() gp = kernel -\> Stheno.wrap(GP(kernel), gpc) f1 = s1 …

---

## [How to understand GP extrapolation shape](https://discourse.julialang.org/t/how-to-understand-gp-extrapolation-shape/62765)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 3\
**Last updated:** [June 21, 2021, 7:15am UTC](https://discourse.julialang.org/t/how-to-understand-gp-extrapolation-shape/62765 "2021-06-21T07:15:38Z")

</div>

using CairoMakie using KernelFunctions using AbstractGPs n = 30 x\_train = rand(n) .+ 1 y\_train = log.(x\_train) f = GP(Matern52Kernel()) fx = f(x\_train, 0.1) p\_fx = posterior(fx, y\_train) fig = Figure() Axis(fig\[1…

---

## [Running TemporalGPs/Stheno sampling](https://discourse.julialang.org/t/running-temporalgps-stheno-sampling/59780)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 25\
**Last updated:** [May 29, 2021, 2:14pm UTC](https://discourse.julialang.org/t/running-temporalgps-stheno-sampling/59780 "2021-05-29T14:14:19Z")

</div>

I want to try sampling with TemporalGPs because it may be faster on larger data, as mentioned in another thread. The docs say to use Stheno’s examples for reference so I tried that. I had some issues and questions: II…

---

## [Faster gp fitting on million observations?](https://discourse.julialang.org/t/faster-gp-fitting-on-million-observations/59519)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 15\
**Last updated:** [May 4, 2021, 1:51am UTC](https://discourse.julialang.org/t/faster-gp-fitting-on-million-observations/59519 "2021-05-04T01:51:57Z")

</div>

I have a million-observation regression problem with one outcome and several predictors, including a time variable. I would like to fit the over-time variation with a Gaussian process. I tried using AbstractGPs with Dyna…

---

## [Importing CairoMakie prevents sampling](https://discourse.julialang.org/t/importing-cairomakie-prevents-sampling/59501)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 7\
**Last updated:** [April 22, 2021, 8:47am UTC](https://discourse.julialang.org/t/importing-cairomakie-prevents-sampling/59501 "2021-04-22T08:47:42Z")

</div>

I have a script that runs fine unless I have import CairoMakie at the top. Then it hangs. How can I diagnose this? It hangs at mcmc\_with\_warmup. The same thing happens whether I have using CairoMakie or import CairoMaki…

---

## [AGP with linear predictors](https://discourse.julialang.org/t/agp-with-linear-predictors/59630)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 3\
**Last updated:** [April 21, 2021, 4:50pm UTC](https://discourse.julialang.org/t/agp-with-linear-predictors/59630 "2021-04-21T16:50:14Z")

</div>

Continuing my experiments from another thread using the suggestion of @theogf, I have some code using AGP. With a single predictor I can fit: using AugmentedGaussianProcesses const AGP = AugmentedGaussianProcesses using…

---

## [Understanding Stheno example](https://discourse.julialang.org/t/understanding-stheno-example/59450)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [April 16, 2021, 11:40pm UTC](https://discourse.julialang.org/t/understanding-stheno-example/59450 "2021-04-16T23:40:35Z")

</div>

This example fits a GP and plots something. I am trying to understand all the objects here. using Stheno using Stheno.AbstractGPs using CairoMakie # Short length-scale and small variance. const l1 = 0.4 const s1 = 0.2…

---

## [Stheno with Makie](https://discourse.julialang.org/t/stheno-with-makie/58882)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 4\
**Last updated:** [April 10, 2021, 1:04pm UTC](https://discourse.julialang.org/t/stheno-with-makie/58882 "2021-04-10T13:04:00Z")

</div>

How can I plot Stheno intervals with Makie (instead of Plots.jl)? Docs Stheno.jl knows how to use Plots.jl to plot GPs, so it’s straightforward to look at the posterior: x\_plot = range(-4.0, 4.0; length=1000); plot!…

---

## [Gaussian Processes with missing data](https://discourse.julialang.org/t/gaussian-processes-with-missing-data/53987)

<div class="topic-metadata">

**Author:** [@michielver](https://discourse.julialang.org/u/michielver)\
**Replies:** 11\
**Last updated:** [February 8, 2021, 12:38pm UTC](https://discourse.julialang.org/t/gaussian-processes-with-missing-data/53987 "2021-02-08T12:38:10Z")

</div>

Hi everyone, My data (and data generating process) is probably quite peculiar, but nevertheless me (and my supervisor) are convinced it should be possible to model using probabilistic programming, and we believe Gaussia…

---

## [Truncated Gaussian Process with AbstractGPs?](https://discourse.julialang.org/t/truncated-gaussian-process-with-abstractgps/53779)

<div class="topic-metadata">

**Author:** [@michielver](https://discourse.julialang.org/u/michielver)\
**Replies:** 4\
**Last updated:** [January 27, 2021, 1:05pm UTC](https://discourse.julialang.org/t/truncated-gaussian-process-with-abstractgps/53779 "2021-01-27T13:05:12Z")

</div>

Hi all, So I have started to work with gaussian process for a time-series model in my case, and I have a variable of interest “score”, which is always between 0 and 4, and varies over time. Now I am using AbstractGPs a…

---

## [Gaussian Process Model with Turing](https://discourse.julialang.org/t/gaussian-process-model-with-turing/42453)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 84\
**Last updated:** [November 28, 2020, 6:12pm UTC](https://discourse.julialang.org/t/gaussian-process-model-with-turing/42453 "2020-11-28T18:12:19Z")

</div>

Is it possible to specifiy a Gaussian process (GP) regression model directly in Turing? I’ve looked at Stheno.jl and GaussianProcesses.jl, but neither have an obvious way to specify a multivariate model (GaussianProcesse…
