mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-12 05:22:38 +02:00
Minor fixes to classification to allow kernel choice, change of oil example to use full test set and full training set.
This commit is contained in:
parent
2004cf3ea9
commit
0380f52702
3 changed files with 83 additions and 66 deletions
|
|
@ -107,11 +107,12 @@ class MLP(Kernpart):
|
|||
|
||||
def dK_dX(self, dL_dK, X, X2, target):
|
||||
"""Derivative of the covariance matrix with respect to X"""
|
||||
self._K_computations(X, X2)
|
||||
gX = np.zeros((X2.shape[0], X.shape[1], X.shape[0]))
|
||||
raise NotImplementedError
|
||||
# self._K_computations(X, X2)
|
||||
# gX = np.zeros((X2.shape[0], X.shape[1], X.shape[0]))
|
||||
|
||||
for i in range(X.shape[0]):
|
||||
gX[:, :, i] = self._dK_dX_point(dL_dK, X, X2, target, i)
|
||||
# for i in range(X.shape[0]):
|
||||
# gX[:, :, i] = self._dK_dX_point(dL_dK, X, X2, target, i)
|
||||
|
||||
|
||||
def _dK_dX_point(self, dL_dK, X, X2, target, i):
|
||||
|
|
@ -161,7 +162,3 @@ class MLP(Kernpart):
|
|||
self._K_diag_numer = (X*X).sum(1)*self.weight_variance + self.bias_variance
|
||||
self._K_diag_denom = self._K_diag_numer+1.
|
||||
self._K_diag_dvar = four_over_tau*np.arcsin(self._K_diag_numer/self._K_diag_denom)
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue