mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-24 14:15:14 +02:00
warning messages optional for re-constraining
This commit is contained in:
parent
e0d7de9b3b
commit
3a97eaf684
2 changed files with 20 additions and 18 deletions
|
|
@ -250,7 +250,7 @@ class Model(Parameterized):
|
|||
else:
|
||||
self._set_params_transformed(initial_parameters)
|
||||
|
||||
def ensure_default_constraints(self):
|
||||
def ensure_default_constraints(self, warning=True):
|
||||
"""
|
||||
Ensure that any variables which should clearly be positive
|
||||
have been constrained somehow. The method performs a regular
|
||||
|
|
@ -268,7 +268,7 @@ class Model(Parameterized):
|
|||
if not (i in currently_constrained):
|
||||
to_make_positive.append(i)
|
||||
if len(to_make_positive):
|
||||
self.constrain_positive(np.asarray(to_make_positive))
|
||||
self.constrain_positive(np.asarray(to_make_positive), warning=warning)
|
||||
|
||||
def objective_function(self, x):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue