View source: R/generation_kernel.R
| generation_kernel | R Documentation |
Given a particular type of kernel, to be chosen among (gaussian,
exponential and sobolev), it returns the
evaluation of the eigenfunctions of the kernel on the grid domain
and the correspondent eigenvalues.
generation_kernel(type = "sobolev", parameter = NULL, domain, thres = 0.99, return.derivatives = FALSE)
type |
string. Type of kernel. Three possible choices implemented:
|
parameter |
scalar. Value of the characteristic parameter of the kernel.
It is the σ
parameter of the Gaussian and the Exponential kernel, as introduced in |
domain |
vector. |
thres |
scalar. Threshold to identify the significant
eigenvalues of the kernel. The number of significant eigennvalues ∑_{j = 1}^J θ_j ≥q \textrm{thres} ∑_{j = 1}^{∞} θ_j. Default is 0.99. |
return.derivatives |
bool. If |
Here the list of the kernel defined in this function
gaussian
k(x, x') = \exp(-σ \| x- x'\|^2)
exponential
k(x, x') = \exp(-σ \| x- x'\|)
sobolev, the kernel associated to the norm in the H^1 space
\| f \|^2 = \int_{D} f(t)^2 dt + \frac{1}{σ} \int_{D} f'(t)^2 dt
where D is the one-dimensional domain and f' is the first derivative of the function.
list containing
eigenvect m \times J matrix of
the eigenfunctions of the kernel evaluated on the domain.
eigenval J-length vector of the
eigenvalues of the kernel
derivatives. if return.derivatives = TRUE.
derivatives is the (m-1) \times J matrix of the derivatives of
the eigenfunctions evaluated on the time domain.
# definition of the kernel
type_kernel <- 'sobolev'
param_kernel <- 8
T_domain <- seq(0, 1, length = 50)
kernel_here <- generation_kernel ( type = type_kernel,
parameter = param_kernel,
domain = T_domain,
thres = 0.99,
return.derivatives = TRUE)
eigenvalues <- kernel_here$eigenval
eigenvectors <- kernel_here$eigenvect
der <- kernel_here$derivatives
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.