mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-08 11:32:39 +02:00
adding kernels flattening and parameters already in hierarchy
This commit is contained in:
parent
9c553ba15c
commit
6637eb7ac8
11 changed files with 624 additions and 9 deletions
|
|
@ -170,4 +170,11 @@ class Add(CombinationKernel):
|
|||
def _setstate(self, state):
|
||||
super(Add, self)._setstate(state)
|
||||
|
||||
|
||||
def add(self, other, name='sum'):
|
||||
if isinstance(other, Add):
|
||||
other_params = other._parameters_.copy()
|
||||
for p in other_params:
|
||||
other.remove_parameter(p)
|
||||
self.add_parameters(*other_params)
|
||||
else: self.add_parameter(other)
|
||||
return self
|
||||
Loading…
Add table
Add a link
Reference in a new issue