Dear gaussian process experts,
i'm trying to optimize the hyperparameters for a gaussian process. As a starter i choose the squared exponential formula for covariance where i have to optimize 3 parameters sigma_f, sigma_n and the length parameter l.
$\ k_y(x_p,x_q) = \sigma^2_f exp(-\frac{1}{2l^2}(x_p-x_q)^2) + \sigma^2_n\delta_{pq}$
As described in [1] i try to maximize the marginal likelihood using the parameters. To achieve this i use Commons Math optimizers and compute the gradients of the marginal likelihood function.
PROBLEM: Everything works fine for a tiny example if i only use $ \sigma_f $ and $ l$ for the optimisation. As soon as i try to optimize $ \sigma_n$ as well, i ran into numerical problems and the the covariance matrix of the process is NOT positive-definite anymore after a view iterations of the optimizer and thus produces INFINITY or NAN errors within the optimizer.
Can anyone explain that behavior and the connection to the hyperparameter $ \sigma_n$?
[1] Gaussian Processes for Machine Learning Carl Edward Rasmussen and Christopher K. I. Williams The MIT Press, 2006. ISBN 0-262-18253-X.