LuasKernel.generate_noise#
- LuasKernel.generate_noise(hp: Any, x_l: Array, x_t: Array, size: int | None = 1) Array[source]#
Generate noise with the covariance matrix returned by this kernel using the input hyperparameters
hp.Solves for the matrix square root of K and then multiplies this by a random normal vector. Doing it this way has numerical stability advantages over generating noise separately for each of the two kronecker products of K as they might not both be well-conditioned matrices.
- 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)ford_ldifferent 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)ford_tdifferent time/horizontal regression variables.size (int, optional) – The number of different draws of noise to generate. Defaults to 1.
- Returns:
If
size = 1will generate noise of shape(N_l, N_t), otherwise ifsize > 1then generated noise will be of shape(N_l, N_t, size).- Return type:
JAXArray