mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-08 15:05:15 +02:00
new: added to_dict() method to Coregionalize kernel class
This commit is contained in:
parent
3e19a85575
commit
ba050dabfb
1 changed files with 15 additions and 0 deletions
|
|
@ -134,3 +134,18 @@ class Coregionalize(Kern):
|
|||
|
||||
def gradients_X_diag(self, dL_dKdiag, X):
|
||||
return np.zeros(X.shape)
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Convert the object into a json serializable dictionary.
|
||||
|
||||
Note: It uses the private method _save_to_input_dict of the parent.
|
||||
|
||||
:return dict: json serializable dictionary containing the needed information to instantiate the object
|
||||
"""
|
||||
|
||||
input_dict = super(Coregionalize, self)._save_to_input_dict()
|
||||
input_dict["class"] = "GPy.kern.Coregionalize"
|
||||
input_dict["W"] = self.W.values.tolist()
|
||||
input_dict["kappa"] = self.kappa.values.tolist()
|
||||
return input_dict
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue