LuasKernel.eigendecomp_no_stored_values

LuasKernel.eigendecomp_no_stored_values#

LuasKernel.eigendecomp_no_stored_values(hp: Any, x_l: Array, x_t: Array, stored_values: Any | None = {}) Any[source]#

Required calculations for the decomposition of the overall matrix K where the previously stored decomposition of K cannot be used for the calculation of a new decomposition. This avoids checking if any of the matrices have changed but may result in performing the same eigendecomposition calculations multiple times.

We can decompose the inverse of K into the matrices:

\[K^{-1} = [W_l \otimes W_t] D^{-1} [W_l^T \otimes W_t^T]\]

Where this function will calculate W_l, W_t and D_inv and stored them in the stored_values PyTree for future log likelihood calculations.

Note

Values still need to be stored for any log likelihood calculations so this method does not save memory over eigendecomp_use_stored_values. It may however reduce runtimes by avoiding checking if matrices have changed so it could be beneficial if all hyperparameters are being varied simultaneously for each calculation.

Parameters:
  • hp (Pytree) – Hyperparameters needed to build the covariance matrices Kl, Kt, Sl, St. Will be unaffected if additional mean function parameters are also included.

  • x_l (JAXArray) – Array containing wavelength/vertical dimension regression variable(s) for the observed locations. May be of shape (N_l,) or (d_l,N_l) for d_l different wavelength/vertical regression variables.

  • x_t (JAXArray) – Array containing time/horizontal dimension regression variable(s) for the observed locations. May be of shape (N_t,) or (d_t,N_t) for d_t different time/horizontal regression variables.

  • stored_values (PyTree) – This may contain stored values from the decomposition of K but this method will not make use of it. This dictionary will simply be overwritten with new stored values from the decomposition of K.

Returns:

Stored values from the decomposition of the covariance matrices. For LuasKernel this consists of values computed using the eigendecomposition of each matrix and also the log determinant of K.

Return type:

PyTree