mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
More useful message from testing re offset estimate
This commit is contained in:
parent
ea8b732181
commit
16bc77a1ed
1 changed files with 2 additions and 1 deletions
|
|
@ -421,8 +421,9 @@ class MiscTests(unittest.TestCase):
|
||||||
Y = np.vstack([Y,Y])
|
Y = np.vstack([Y,Y])
|
||||||
|
|
||||||
m = GPy.models.GPOffsetRegression(X,Y)
|
m = GPy.models.GPOffsetRegression(X,Y)
|
||||||
|
assert m.checkgrad(), "Gradients of offset parameters don't match numerical approximations."
|
||||||
m.optimize()
|
m.optimize()
|
||||||
assert np.abs(m.offset[0]-offset)<0.1, "GPOffsetRegression model failing to estimate correct offset."
|
assert np.abs(m.offset[0]-offset)<0.1, ("GPOffsetRegression model failing to estimate correct offset (value estimated = %0.2f instead of %0.2f)" % (m.offset[0], offset))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue