runlmc.kern.rbf module¶
-
class
runlmc.kern.rbf.RBF(inv_lengthscale=1, name='rbf', active_dims=None)[source]¶ Bases:
runlmc.kern.stationary_kern.StationaryKernThis class defines the RBF kernel \(k\).
\[k(r) = \exp \frac{-\gamma r^2}{2}\]Parameters: - inv_lengthscale – \(\gamma\), above.
- name –
- active_dims – see
runlmc.kern.stationary_kern.StationaryKernfor details.
-
from_dist(dists)[source]¶ Parameters: dists – N-size numpy array of positive (Euclidean) distances. Returns: kernel value at each of the given distances
-
kernel_gradient(dists)[source]¶ Let this kernel be parameterized by some parameters \(\boldsymbol\theta\in\mathbb{R}^p\). For every \(\theta_j\in\boldsymbol\theta\), at any given distance \(d\), we can compute the derivative \(\partial_{\theta_j}k(d)\). For the evaluation of this partial derivative at multiple places, \(\textbf{d}\), we call the vector of partial derivatives \(\partial_{\theta_j}k(\textbf{d})\).
Parameters: dists – a one-dimensional array of distances corresponding to \(\textbf{d}\), above. Returns: An iterable whose \(j\)-th entry is \(\partial_{\theta_j}k(\textbf{d})\).
-
update_gradient(grad)[source]¶ Parameters: grad – a one-dimensional array, representing the gradient vector \(\nabla_{\boldsymbol\theta}L\) for the likelihood with respect to this kernel’s parameters, in the same order of parameters as the row order returned by kernel_gradient().