View source: R/kernel-to-matrices.R
kern_to_inv | R Documentation |
kern_to_inv()
creates the inverse of a covariance matrix between
input values (that could be either scalars or vectors) evaluated within
a kernel function, which is characterised by specified hyper-parameters.
This matrix is a finite-dimensional evaluation of the
infinite-dimensional covariance structure of a GP, defined thanks to this
kernel.
kern_to_inv(input, kern, hp, pen_diag = 1e-10, deriv = NULL)
input |
A vector, matrix, data frame or tibble containing all inputs for one individual. If a vector, the elements are used as reference, otherwise ,one column should be named 'Input' to indicate that it represents the reference (e.g. 'Input' would contain the timestamps in time-series applications). The other columns are considered as being covariates. If no column is named 'Input', the first one is used by default. |
kern |
A kernel function. Several popular kernels (see The Kernel Cookbook) are already implemented and can be selected within the following list:
|
hp |
A list, data frame or tibble containing the hyper-parameters used in the kernel. The name of the elements (or columns) should correspond exactly to those used in the kernel definition. |
pen_diag |
A jitter term that is added to the covariance matrix to avoid numerical issues when inverting, in cases of nearly singular matrices. |
deriv |
A character, indicating according to which hyper-parameter the derivative should be computed. If NULL (default), the function simply returns the inverse covariance matrix. |
The inverse of a covariance matrix, which elements are evaluations of the associated kernel for each pair of reference inputs.
TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.