mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-21 14:05:14 +02:00
roundtrip error fixed for likelihood tests
This commit is contained in:
parent
0919544eb7
commit
f21e8e2394
3 changed files with 10 additions and 11 deletions
|
|
@ -154,8 +154,7 @@ class Model(Parameterized):
|
|||
x = np.random.randn(self.size_transformed)
|
||||
x = self._untransform_params(x)
|
||||
# now draw from prior where possible
|
||||
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]
|
||||
[np.put(x, ind, p.rvs(ind.size)) for p, ind in self.priors.iteritems() 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...)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue