LuasKernel.visualise_covariance_matrix#
- LuasKernel.visualise_covariance_matrix(hp: Any, x_l: Array, x_t: Array, corr: bool | None = False, wn: bool | None = True, x_l_plot: Array | None = None, x_t_plot: Array | None = None, full: bool | None = False) Figure[source]#
Visualise the covariance matrix/matrices generated by the input hyperparameters.
Note
Default behaviour is to separately visualise each of the 4 component covariance matrices
Kl,Kt,Sl,Stwhich are used to calculate the full covariance matrixK. Iffull = Truethen will instead build the full covariance matrixKbut this is very memory intensive as it requires creating a JAXArray with(N_l*N_t, N_l*N_t)entries.- 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.corr (bool, optional) – If
Truewill plot the correlation between points instead of the covariance. Defaults toFalse.wn (bool, optional) – Whether to include white noise in the calculation of covariance. Defaults to
True.x_l_plot (JAXArray, optional) – The values on the y-axis used by
plt.pcolormeshfor the plot. If not included will default tox_lifx_lis of shape(N_l,)or tox_l[0, :]ifx_lis of shape(d_l, N_l).x_t_plot (JAXArray, optional) – The values on the x-axis used by
plt.pcolormeshfor the plot. If not included will default tox_tifx_tis of shape(N_t,)or tox_t[0, :]ifx_tis of shape(d_t, N_t).full (bool, optional) – If
Truewill build and visualise the full constructed covariance matrix
- Returns:
A figure displaying the covariance of each point in the observed data with the selected point located at
(i, j)in the observed dataY.- Return type:
plt.Figure