mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-24 14:15:14 +02:00
Added proper comments to the test.
This commit is contained in:
parent
14aced457f
commit
cdbedbc403
2 changed files with 19 additions and 4 deletions
|
|
@ -50,10 +50,12 @@ class Transformation(object):
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
from ...plotting.matplot_dep import base_plots
|
from ...plotting.matplot_dep import base_plots
|
||||||
x = np.linspace(-8,8)
|
x = np.linspace(-8,8)
|
||||||
base_plots.meanplot(x, self.f(x),axes=axes*args,**kw)
|
base_plots.meanplot(x, self.f(x), ax=axes, *args, **kw)
|
||||||
axes = plt.gca()
|
axes = plt.gca()
|
||||||
axes.set_xlabel(xlabel)
|
axes.set_xlabel(xlabel)
|
||||||
axes.set_ylabel(ylabel)
|
axes.set_ylabel(ylabel)
|
||||||
|
return axes
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,14 @@
|
||||||
|
"""
|
||||||
|
Tests whether or not the tansformation plot works as expected.
|
||||||
|
It does not work on the normal build.
|
||||||
|
|
||||||
|
Author:
|
||||||
|
Ilias Bilionis
|
||||||
|
|
||||||
|
Date:
|
||||||
|
3/8/2015
|
||||||
|
"""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
# Make sure we load the GP that is here
|
# Make sure we load the GP that is here
|
||||||
|
|
@ -5,6 +16,8 @@ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')
|
||||||
import GPy
|
import GPy
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
f = GPy.constraints.Logexp()
|
|
||||||
f.plot()
|
if __name__ == '__main__':
|
||||||
plt.show(block=True)
|
f = GPy.constraints.Logexp()
|
||||||
|
f.plot()
|
||||||
|
plt.show(block=True)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue