mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-21 14:05:14 +02:00
assorted fixes
This commit is contained in:
parent
75241ecf89
commit
6346af8764
5 changed files with 10 additions and 8 deletions
|
|
@ -170,15 +170,13 @@ class Model(Parameterized):
|
|||
# first take care of all parameters (from N(0,1))
|
||||
#x = self._get_params_transformed()
|
||||
x = np.random.randn(self.size_transformed)
|
||||
self._set_params_transformed(x)
|
||||
x = self._untransform_params(x)
|
||||
# now draw from prior where possible
|
||||
x = self._get_params()
|
||||
if self.priors is not None:
|
||||
if self.priors is not None and len(self.priors):
|
||||
[np.put(x, i, p.rvs(1)) for i, p in enumerate(self.priors) if not p is None]
|
||||
self._set_params(x)
|
||||
#self._set_params_transformed(self._get_params_transformed()) # makes sure all of the tied parameters get the same init (since there's only one prior object...)
|
||||
|
||||
|
||||
def optimize_restarts(self, num_restarts=10, robust=False, verbose=True, parallel=False, num_processes=None, **kwargs):
|
||||
"""
|
||||
Perform random restarts of the model, and set the model to the best
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue