# Multi output Gaussian Process package?

**URL:** <https://discourse.julialang.org/t/multi-output-gaussian-process-package/95335>\
**Category:** Statistics\
**Tags:** regression, fit, gaussian-process\
**Created:** [February 28, 2023, 2:22pm UTC](https://discourse.julialang.org/t/multi-output-gaussian-process-package/95335 "2023-02-28T14:22:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lsablon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lsablon/32/47083_2.png) [@lsablon](https://discourse.julialang.org/u/lsablon)\
**Post date:** [February 28, 2023, 2:22pm UTC](https://discourse.julialang.org/t/multi-output-gaussian-process-package/95335/1 "2023-02-28T14:22:22Z")

</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 package that accepts `X_train` and `y_train` as matrices (each row would describe a single experiment, parameters in `X`, grid |\> vec results in `y`). Most of the packages available rely on the `AbstractGPs.jl` package, which requires `y_train` to be a vector of scalars.

I’m wondering if there’s a solution to this problem using a single model, or if I should define a separate model for each grid point. Any advice would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![SebastianCallh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sebastiancallh/32/16102_2.png) [@SebastianCallh](https://discourse.julialang.org/u/SebastianCallh)\
**Post date:** [February 28, 2023, 3:30pm UTC](https://discourse.julialang.org/t/multi-output-gaussian-process-package/95335/2 "2023-02-28T15:30:37Z")

</div>

Hello! Have you seen [GitHub - JuliaGaussianProcesses/Stheno.jl: Probabilistic Programming with Gaussian processes in Julia](https://github.com/JuliaGaussianProcesses/Stheno.jl) ? It claims to be flexible enough to do these things

---

<div class="post-metadata">

**Author:** ![willtebbutt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/willtebbutt/32/6790_2.png) [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Post date:** [February 28, 2023, 3:41pm UTC](https://discourse.julialang.org/t/multi-output-gaussian-process-package/95335/3 "2023-02-28T15:41:54Z")

</div>

Was about to reply to this and realised that our multi-output GP documentation is currently lacking (unless I’ve forgotten where we put it). In short: it’s quite straightforward to do multi-output stuff with AbstractGPs / KernelFunctions

Am working on a gist to show you how to do multi-output stuff now @lsablon , which I’ll turn into a proper example in kernelfunctions / abstractgps later today.

---

<div class="post-metadata">

**Author:** ![willtebbutt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/willtebbutt/32/6790_2.png) [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Post date:** [February 28, 2023, 4:00pm UTC](https://discourse.julialang.org/t/multi-output-gaussian-process-package/95335/4 "2023-02-28T16:00:54Z")

</div>

Please see the gist [here](https://gist.github.com/willtebbutt/b5fdb5259ef59eb4178489ccb61c5cd0). I’d recommend consulting the docs both [here](https://juliagaussianprocesses.github.io/KernelFunctions.jl/dev/design/) and [here](https://juliagaussianprocesses.github.io/KernelFunctions.jl/dev/kernels/#Multi-output-Kernels) if you’re interested in understanding what’s going on, and to get a sense of why things are the way that they are.
