-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error When Evaluating Log Likelihood for MvGaussianRandomWalk #2858
Comments
On master I am not getting an error: pm.MvGaussianRandomWalk.dist(mu=tt.constant([1,1]), cov=tt.constant(np.eye(2))).logp(tt.constant([[1,2]])).eval()
array(0.) But I am not sure if the output is correct. I get zero no matter what I put in the mu or logp: pm.MvGaussianRandomWalk.dist(mu=tt.constant([10,1]), cov=tt.constant(np.eye(2)*5)).logp(tt.constant([[1,10]])).eval()
array(0.) |
@ricardoV94 I think it's working as expected. Passing a distribution such as |
@kc611 That's what I was thinking, but thank you for confirming it. It would be useful to identify which commit fixed this issue and add a unit test that fails before and passes after. |
The So, I suspect a major refactoring of these logp methods but I think it would make things simpler if efforts are redirected towards solving #4047 first for generalizing random walks. |
@Sayam753 I see, there is a much broader issue going on with the RandomWalk methods. Is there an issue that summarizes everything in one place (linking to all the separate issues)? That could be helpful to come back once the RandomWalk methods have been refactored. |
I have these ideas -
|
Has the pre-requisites to convert these (I don't know much about the |
#4440 introduces major design changes for RandomVariable OP and is WIP. So, I guess it will be a good idea to follow the changes for better generalizing The
Yes. A general implementation for |
When I initialize a
MvGaussianRandomWalk
distribution using thecov
keyword and try to evaluate the log likelihood as follows:I get the following error:
However, if I instead use the
tau
orchol
keywords, it runs fine.Digging into it, it looks like the
__initCov__
function of_CovSet
sets values for variablesself.cov
andself.chol_cov
when we provide a covariance matrix viacov
. However, this causes an error when we initialize theMvNormal
in thelogp
function ofMvGaussianRandomWalk
because bothcov
andchol
end up being passed into the initializer forMvNormal
and then to_QuadFormBase
which expects that only one ofcov
,tau
, orchol
is provided.Is this the expected behavior?
The text was updated successfully, but these errors were encountered: