# How to optimize Gaussian-process parameters for multiple tasks with GPML?

I have a lot of test curves and I want to optimize the length and scale parameters simultaneously for all curves. Is this possible?

Cross Validated Asked by Scott Thibault on November 21, 2021

You can write a likelihood for the data in a usual way as far as I can understand.

Let we have data $D = {X, Y} = {mathbf{x}_i, mathbf{y}_i}$_{i = 1}^{n} with $mathbf{x}_i in mathbb{R}^p$, and outputs $mathbf{y}_i in mathbb{R}^m$ is multidimensional. Denote by $mathbf{y}^j = {y_{1j}, y_{2j}, ldots, y_{nj}}$ - A vector which corresponds to $j$-th curve.

You suppose that each curve is a realization of a Gaussian process, but all Gaussian processes have zero mean value and the same covariance function $k(mathbf{x}_i, mathbf{x}_j)$, so you get for each curve the loglikelihood of the the form: $$L(X, mathbf{y}^j) = -frac12 ( (mathbf{y}^j)^T K^{-1} mathbf{y}^j + |K| + n log (2 pi)),$$ here $K = {k(mathbf{x}_i, mathbf{x}_j)}_{i, j = 1}^{n}$ is a sample covariance matrix. And the joint likelihood is a product of separate likelihoods, so we can use common techniques to optimize it. For example, for most covariance function we can calculate derivatives w.r.t covariance function parameters and use a derivative-based optimization.

Answered by Alexey Zaytsev on November 21, 2021

## Related Questions

### Sigma algebra generated by random variable on a set with generators

0  Asked on July 28, 2020 by gabriel

### What is the seasonal trend lowess model in time series?

0  Asked on July 28, 2020 by christopher-u

### Non seasonal and seasonal parameters of this time-series

0  Asked on July 27, 2020 by statsmonkey

### Extended Cox model and cox.zph

2  Asked on July 25, 2020 by finance