Skip to content

Commit

Permalink
made initial lengthscale!=1 to ensure we're properly testing gradients
Browse files Browse the repository at this point in the history
  • Loading branch information
lionfish0 committed Aug 4, 2016
1 parent 97f5ca6 commit ad2779b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions GPy/testing/model_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ def test_offset_regression(self):
Y = np.vstack([Y,Y])

m = GPy.models.GPOffsetRegression(X,Y)
m.rbf.lengthscale=5.0 #make it something other than one to check our gradients properly!
assert m.checkgrad(), "Gradients of offset parameters don't match numerical approximations."
m.optimize()
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))
Expand Down

0 comments on commit ad2779b

Please sign in to comment.