mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-08 11:32:39 +02:00
tidying
This commit is contained in:
parent
205fe3cbd0
commit
2da256fa93
2 changed files with 7 additions and 13 deletions
|
|
@ -49,9 +49,6 @@ class Stationary(Kern):
|
|||
self.variance.gradient = np.sum(dL_dKdiag)
|
||||
self.lengthscale.gradient = 0.
|
||||
|
||||
def gradients_X_diag(self, dL_dKdiag, X):
|
||||
return np.zeros(X.shape)
|
||||
|
||||
def update_gradients_full(self, dL_dK, X, X2=None):
|
||||
K = self.K(X, X2)
|
||||
self.variance.gradient = np.sum(K * dL_dK)/self.variance
|
||||
|
|
@ -82,6 +79,9 @@ class Stationary(Kern):
|
|||
ret *= 2.
|
||||
return ret
|
||||
|
||||
def gradients_X_diag(self, dL_dKdiag, X):
|
||||
return np.zeros(X.shape)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -104,16 +104,6 @@ class Matern32(Stationary):
|
|||
|
||||
k(r) = \\sigma^2 (1 + \\sqrt{3} r) \exp(- \sqrt{3} r) \\ \\ \\ \\ \\text{ where } r = \sqrt{\sum_{i=1}^input_dim \\frac{(x_i-y_i)^2}{\ell_i^2} }
|
||||
|
||||
:param input_dim: the number of input dimensions
|
||||
:type input_dim: int
|
||||
:param variance: the variance :math:`\sigma^2`
|
||||
:type variance: float
|
||||
:param lengthscale: the vector of lengthscale :math:`\ell_i`
|
||||
:type lengthscale: array or list of the appropriate size (or float if there is only one lengthscale parameter)
|
||||
:param ARD: Auto Relevance Determination. If equal to "False", the kernel is isotropic (ie. one single lengthscale parameter \ell), otherwise there is one lengthscale parameter per dimension.
|
||||
:type ARD: Boolean
|
||||
:rtype: kernel object
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, input_dim, variance=1., lengthscale=None, ARD=False, name='Mat32'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue