GP.logL_hessianable_stored

GP.logL_hessianable_stored#

GP.logL_hessianable_stored(p: Any, Y: Array, stored_values: Any) Tuple[Any, Any][source]#

Computes the log likelihood and also returns any stored values from the decomposition of the covariance matrix. This function is slower for gradient calculations than GP.logL_stored but is more numerically stable for second-order derivative calculations as required when calculating the hessian. This function still only returns the log likelihood so jax.hessian must be applied to return the hessian of the log likelihood.

Parameters:
  • p (PyTree) – Pytree of hyperparameters used to calculate the covariance matrix in addition to any mean function parameters which may be needed to calculate the mean function.

  • Y (JAXArray) – Observed data to fit, must be of shape (N_l, N_t).

  • stored_values (PyTree) – Stored values from the decomposition of the covariance matrix. The specific values contained in this PyTree depend on the choice of Kernel object and are returned by Kernel.decomp_fn.

Returns:

A tuple where the first element is the value of the log likelihood. The second element is a PyTree which contains stored values from the decomposition of the covariance matrix.

Return type:

(Scalar, PyTree)