mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
re-merged. only RA's errors (probit?) remain
This commit is contained in:
parent
29790e327a
commit
6d64559f1f
2 changed files with 6 additions and 6 deletions
|
|
@ -20,7 +20,7 @@ from GPy.core.domains import POSITIVE, REAL
|
|||
class model(parameterised):
|
||||
def __init__(self):
|
||||
parameterised.__init__(self)
|
||||
self.priors = [None for i in range(self._get_params().size)]
|
||||
self.priors = None
|
||||
self.optimization_runs = []
|
||||
self.sampling_runs = []
|
||||
self.preferred_optimizer = 'tnc'
|
||||
|
|
@ -55,7 +55,7 @@ class model(parameterised):
|
|||
if self.priors is None:
|
||||
self.priors = [None for i in range(self._get_params().size)]
|
||||
|
||||
which = self.grep_param_names(which)
|
||||
which = self.grep_param_names(regexp)
|
||||
|
||||
# check tied situation
|
||||
tie_partial_matches = [tie for tie in self.tied_indices if (not set(tie).isdisjoint(set(which))) & (not set(tie) == set(which))]
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ class PriorTests(unittest.TestCase):
|
|||
X, y = X[:, None], y[:, None]
|
||||
m = GPy.models.GP_regression(X, y)
|
||||
m.ensure_default_constraints()
|
||||
lognormal = GPy.priors.log_Gaussian(1, 2)
|
||||
lognormal = GPy.priors.LogGaussian(1, 2)
|
||||
m.set_prior('rbf', lognormal)
|
||||
m.randomize()
|
||||
self.assertTrue(m.checkgrad())
|
||||
|
||||
def test_gamma(self):
|
||||
def test_Gamma(self):
|
||||
xmin, xmax = 1, 2.5*np.pi
|
||||
b, C, SNR = 1, 0, 0.1
|
||||
X = np.linspace(xmin, xmax, 500)
|
||||
|
|
@ -29,8 +29,8 @@ class PriorTests(unittest.TestCase):
|
|||
X, y = X[:, None], y[:, None]
|
||||
m = GPy.models.GP_regression(X, y)
|
||||
m.ensure_default_constraints()
|
||||
gamma = GPy.priors.gamma(1, 1)
|
||||
m.set_prior('rbf', gamma)
|
||||
Gamma = GPy.priors.Gamma(1, 1)
|
||||
m.set_prior('rbf', Gamma)
|
||||
m.randomize()
|
||||
self.assertTrue(m.checkgrad())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue