From ec70fef7809d27dd4658e247e664695f5336f2e1 Mon Sep 17 00:00:00 2001 From: James Hensman Date: Wed, 14 May 2014 10:04:58 +0100 Subject: [PATCH] minor edit in scg, raise notimplemented dL_dX in hierarchical --- GPy/inference/optimization/scg.py | 2 +- GPy/kern/_src/independent_outputs.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/GPy/inference/optimization/scg.py b/GPy/inference/optimization/scg.py index c99fa7d1..503c19be 100644 --- a/GPy/inference/optimization/scg.py +++ b/GPy/inference/optimization/scg.py @@ -32,7 +32,7 @@ def print_out(len_maxiters, fnow, current_grad, beta, iteration): sys.stdout.flush() def exponents(fnow, current_grad): - exps = [np.abs(fnow), current_grad] + exps = [np.abs(np.float(fnow)), current_grad] return np.sign(exps) * np.log10(exps).astype(int) def SCG(f, gradf, x, optargs=(), maxiters=500, max_f_eval=np.inf, display=True, xtol=None, ftol=None, gtol=None): diff --git a/GPy/kern/_src/independent_outputs.py b/GPy/kern/_src/independent_outputs.py index 12c51ca3..64314197 100644 --- a/GPy/kern/_src/independent_outputs.py +++ b/GPy/kern/_src/independent_outputs.py @@ -180,6 +180,9 @@ class Hierarchical(CombinationKernel): def Kdiag(self,X): return np.diag(self.K(X)) + def gradients_X(self, dL_dK, X, X2=None): + raise NotImplementedError + def update_gradients_full(self,dL_dK,X,X2=None): slices = [index_to_slices(X[:,i]) for i in self.extra_dims] if X2 is None: