Skip to content
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

Use logdet() instead of log(det()) #1012

Closed
taku-y opened this issue Mar 5, 2016 · 5 comments
Closed

Use logdet() instead of log(det()) #1012

taku-y opened this issue Mar 5, 2016 · 5 comments

Comments

@taku-y
Copy link
Contributor

taku-y commented Mar 5, 2016

harpone is going to implement logdet() in Theano (Theano/Theano#3959), though maybe not merged yet. What do you think of using this in PyMC3 multivariate normal distribution? It is numerically stable than using log(det()) as in the current implementation.

When I used a sparse ARD regression model with ADVI, the current implementation of mvnormal failed to calculate its log probability because of using log(det()).

@superbobry
Copy link
Contributor

I wonder if Theano optimizer could do the lod(det())->logdet transformation automatically?

@twiecki
Copy link
Member

twiecki commented Mar 5, 2016

@taku-y Great find. If that get's merged into theano I think we should definitely switch. Especially when it fixes a modelijng problem. Btw. an example of an ARD model would be a great contribution.

@superbobry That's a good point too, maybe we should raise that point in the PR.

@twiecki
Copy link
Member

twiecki commented Feb 13, 2017

Let's just copy&paste the LogsAbsDet() code into pymc3/theanof.py, it does not look like it would get merged soon and we really need it. Should add a note to remove it if that PR ever gets merged in Theano.

@ferrine
Copy link
Member

ferrine commented Feb 13, 2017

It will be useful in #1694, so waiting for merging logdet

@bhargavvader
Copy link
Contributor

#1777 is merged, so this can be closed :)

@twiecki twiecki closed this as completed Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants