mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-02 14:45:15 +02:00
Update brownian.py
added to_dict method
This commit is contained in:
parent
b503c71842
commit
400a4880c6
1 changed files with 11 additions and 0 deletions
|
|
@ -23,6 +23,17 @@ class Brownian(Kern):
|
||||||
|
|
||||||
self.variance = Param('variance', variance, Logexp())
|
self.variance = Param('variance', variance, Logexp())
|
||||||
self.link_parameters(self.variance)
|
self.link_parameters(self.variance)
|
||||||
|
|
||||||
|
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(RBF, self)._save_to_input_dict()
|
||||||
|
input_dict["class"] = "GPy.kern.Brownian"
|
||||||
|
return input_dict
|
||||||
|
|
||||||
def K(self,X,X2=None):
|
def K(self,X,X2=None):
|
||||||
if X2 is None:
|
if X2 is None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue