GeneralKernel.K_inv_by_vec

GeneralKernel.K_inv_by_vec#

GeneralKernel.K_inv_by_vec(hp: Any, x_l: Array, x_t: Array, R: Array) Array[source]#

Calculates the product of the inverse of the covariance matrix with a vector, represented by a JAXArray of shape (N_l, N_t). Useful for testing for numerical stability.

Parameters:
  • hp (Pytree) – Hyperparameters needed to build the covariance matrix K. 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.

  • R (JAXArray) – JAXArray of shape (N_l, N_t) representing the vector to multiply on the right by the inverse of the covariance matrix K.

Returns:

The result of multiplying the inverse of the covariance matrix K by the vector R.

Return type:

JAXArray