Small name change

This commit is contained in:
Alan Saul 2015-04-30 17:29:51 +01:00
parent 0e5acd1d2b
commit e744857e0a
3 changed files with 381 additions and 337 deletions

View file

@ -20,7 +20,7 @@ class Constant(Mapping):
""" """
def __init__(self, input_dim, output_dim, value=0., name='linmap'): def __init__(self, input_dim, output_dim, value=0., name='constmap'):
Mapping.__init__(self, input_dim=input_dim, output_dim=output_dim, name=name) Mapping.__init__(self, input_dim=input_dim, output_dim=output_dim, name=name)
value = np.atleast_1d(value) value = np.atleast_1d(value)
if not len(value.shape) ==1: if not len(value.shape) ==1:

View file

@ -141,54 +141,63 @@ class TestNoiseModels(object):
self.noise_models = {"Student_t_default": { self.noise_models = {"Student_t_default": {
"model": GPy.likelihoods.StudentT(deg_free=self.deg_free, sigma2=self.var), "model": GPy.likelihoods.StudentT(deg_free=self.deg_free, sigma2=self.var),
"grad_params": { "grad_params": {
"names": [".*t_scale2", ".*deg_free"], "names": [".*t_scale2"],
"vals": [self.var, self.deg_free], "vals": [self.var],
"constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_positive)] "constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_fixed)]
}, },
"laplace": True "laplace": True
}, },
#"Student_t_deg_free": {
#"model": GPy.likelihoods.StudentT(deg_free=self.deg_free, sigma2=self.var),
#"grad_params": {
#"names": [".*deg_free"],
#"vals": [self.deg_free],
#"constraints": [(".*t_scale2", self.constrain_fixed), (".*deg_free", self.constrain_positive)]
#},
#"laplace": True
#},
"Student_t_1_var": { "Student_t_1_var": {
"model": GPy.likelihoods.StudentT(deg_free=self.deg_free, sigma2=self.var), "model": GPy.likelihoods.StudentT(deg_free=self.deg_free, sigma2=self.var),
"grad_params": { "grad_params": {
"names": [".*t_scale2", ".*deg_free"], "names": [".*t_scale2"],
"vals": [1.0, 8.0], "vals": [1.0],
"constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_positive)] "constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_fixed)]
}, },
"laplace": True "laplace": True
}, },
"Student_t_small_deg_free": { "Student_t_small_deg_free": {
"model": GPy.likelihoods.StudentT(deg_free=1.5, sigma2=self.var), "model": GPy.likelihoods.StudentT(deg_free=1.5, sigma2=self.var),
"grad_params": { "grad_params": {
"names": [".*t_scale2", ".*deg_free"], "names": [".*t_scale2"],
"vals": [self.var, 1.5], "vals": [self.var],
"constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_positive)] "constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_fixed)]
}, },
"laplace": True "laplace": True
}, },
"Student_t_small_var": { "Student_t_small_var": {
"model": GPy.likelihoods.StudentT(deg_free=self.deg_free, sigma2=self.var), "model": GPy.likelihoods.StudentT(deg_free=self.deg_free, sigma2=self.var),
"grad_params": { "grad_params": {
"names": [".*t_scale2", ".*deg_free"], "names": [".*t_scale2"],
"vals": [0.001, self.deg_free], "vals": [0.001],
"constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_positive)] "constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_fixed)]
}, },
"laplace": True "laplace": True
}, },
"Student_t_large_var": { "Student_t_large_var": {
"model": GPy.likelihoods.StudentT(deg_free=self.deg_free, sigma2=self.var), "model": GPy.likelihoods.StudentT(deg_free=self.deg_free, sigma2=self.var),
"grad_params": { "grad_params": {
"names": [".*t_scale2", ".*deg_free"], "names": [".*t_scale2"],
"vals": [10.0, self.deg_free], "vals": [10.0],
"constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_positive)] "constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_fixed)]
}, },
"laplace": True "laplace": True
}, },
"Student_t_approx_gauss": { "Student_t_approx_gauss": {
"model": GPy.likelihoods.StudentT(deg_free=1000, sigma2=self.var), "model": GPy.likelihoods.StudentT(deg_free=1000, sigma2=self.var),
"grad_params": { "grad_params": {
"names": [".*t_scale2", ".*deg_free"], "names": [".*t_scale2"],
"vals": [self.var, 1000], "vals": [self.var],
"constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_positive)] "constraints": [(".*t_scale2", self.constrain_positive), (".*deg_free", self.constrain_fixed)]
}, },
"laplace": True "laplace": True
}, },

File diff suppressed because it is too large Load diff