You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This output seems strange to me as I was expecting to see a single number representing the log likelihood of the single sequence of vectors I input. The log likelihood itself seems correct, but is repeated twice in this case.
Looking into this, I found the problem to be the line:
return self.init.logp(x[0]) + tt.sum(innov_like)
By default, self.init = Flat.dist() and since this is actually a univariate distribution, calling self.init.logp(x[0]) actually returns an array of shape (2,) since x[0] is an array of shape (2,). Therefore, this results in tt.sum(innov_like) being broadcasted into an array rather than a scalar.
I was thinking that we could probably replace this with:
This way, we will correctly return a scalar value when the initial distribution provided is univariate (i.e. the components of the initial vector are iid). Please let me know if I'm mistaken and this was actually the intended behavior.
Versions and main components
PyMC3 Version: 3.3
Theano Version: 1.0.1
Python Version: 2.7.12
Operating system: MacOS 10.13.3
How did you install PyMC3: pip
The text was updated successfully, but these errors were encountered:
I noticed another small quirk with
MvGaussianRandomWalk
. When I run:I get:
This output seems strange to me as I was expecting to see a single number representing the log likelihood of the single sequence of vectors I input. The log likelihood itself seems correct, but is repeated twice in this case.
Looking into this, I found the problem to be the line:
By default,
self.init = Flat.dist()
and since this is actually a univariate distribution, callingself.init.logp(x[0])
actually returns an array of shape (2,) sincex[0]
is an array of shape (2,). Therefore, this results intt.sum(innov_like)
being broadcasted into an array rather than a scalar.I was thinking that we could probably replace this with:
This way, we will correctly return a scalar value when the initial distribution provided is univariate (i.e. the components of the initial vector are iid). Please let me know if I'm mistaken and this was actually the intended behavior.
Versions and main components
PyMC3 Version: 3.3
Theano Version: 1.0.1
Python Version: 2.7.12
Operating system: MacOS 10.13.3
How did you install PyMC3: pip
The text was updated successfully, but these errors were encountered: