mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-02 14:45:15 +02:00
tidied link_fn tests
This commit is contained in:
parent
4656962337
commit
c79c74a2d6
1 changed files with 1 additions and 3 deletions
|
|
@ -7,7 +7,6 @@ _lim_val_exp = np.log(_lim_val)
|
|||
_lim_val_square = np.sqrt(_lim_val)
|
||||
_lim_val_cube = cbrt(_lim_val)
|
||||
from GPy.likelihoods.link_functions import Identity, Probit, Cloglog, Log, Log_ex_1, Reciprocal, Heaviside
|
||||
#np.seterr(over='raise')
|
||||
|
||||
class LinkFunctionTests(np.testing.TestCase):
|
||||
def setUp(self):
|
||||
|
|
@ -80,8 +79,7 @@ class LinkFunctionTests(np.testing.TestCase):
|
|||
assert np.isinf(np.exp(np.log(self.f_upper_lim)))
|
||||
#Check the clipping works
|
||||
np.testing.assert_almost_equal(link.transf(self.f_lower_lim), 0, decimal=5)
|
||||
#Need to look at most significant figures here rather than the decimals
|
||||
np.testing.assert_approx_equal(link.transf(self.f_upper_lim), _lim_val, significant=5)
|
||||
self.assertTrue(np.isfinite(link.transf(self.f_upper_lim)))
|
||||
self.check_overflow(link, lim_of_inf)
|
||||
|
||||
#Check that it would otherwise fail
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue