mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-08 03:22:38 +02:00
a little merge
This commit is contained in:
commit
3ee2dc920c
50 changed files with 2255 additions and 10642 deletions
|
|
@ -141,10 +141,10 @@ class Add(CombinationKernel):
|
|||
from static import White, Bias
|
||||
target_mu = np.zeros(variational_posterior.shape)
|
||||
target_S = np.zeros(variational_posterior.shape)
|
||||
for p1 in self._parameters_:
|
||||
for p1 in self.parameters:
|
||||
#compute the effective dL_dpsi1. extra terms appear becaue of the cross terms in psi2!
|
||||
eff_dL_dpsi1 = dL_dpsi1.copy()
|
||||
for p2 in self._parameters_:
|
||||
for p2 in self.parameters:
|
||||
if p2 is p1:
|
||||
continue
|
||||
if isinstance(p2, White):
|
||||
|
|
@ -160,7 +160,7 @@ class Add(CombinationKernel):
|
|||
|
||||
def add(self, other, name='sum'):
|
||||
if isinstance(other, Add):
|
||||
other_params = other._parameters_[:]
|
||||
other_params = other.parameters[:]
|
||||
for p in other_params:
|
||||
other.remove_parameter(p)
|
||||
self.add_parameters(*other_params)
|
||||
|
|
@ -170,7 +170,4 @@ class Add(CombinationKernel):
|
|||
return self
|
||||
|
||||
def input_sensitivity(self):
|
||||
in_sen = np.zeros(self.input_dim)
|
||||
for i, p in enumerate(self.parts):
|
||||
in_sen[p.active_dims] += p.input_sensitivity()
|
||||
return in_sen
|
||||
return reduce(np.add, [k.input_sensitivity() for k in self.parts])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue