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

Add logistic regression example with NUTS #23

Closed
wants to merge 2 commits into from
Closed

Conversation

rlouf
Copy link
Member

@rlouf rlouf commented Sep 2, 2021

This PR adds an example of a logistic regression model, similar to PyMC3's, and samples from its posterior with NUTS.

@codecov
Copy link

codecov bot commented Sep 2, 2021

Codecov Report

Merging #23 (3fd6aea) into main (d321748) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          344       345    +1     
  Branches        14        14           
=========================================
+ Hits           344       345    +1     
Impacted Files Coverage Δ
aehmc/nuts.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d321748...3fd6aea. Read the comment docs.

@rlouf rlouf linked an issue Sep 15, 2021 that may be closed by this pull request
@twiecki
Copy link
Contributor

twiecki commented Sep 16, 2021

@rlouf Anything that's missing here?

@rlouf
Copy link
Member Author

rlouf commented Sep 17, 2021

Yep, correct results.

@brandonwillard brandonwillard added the documentation Improvements or additions to documentation label Sep 18, 2021
@brandonwillard
Copy link
Member

What's causing the current issue with the logistic regression results?

@rlouf
Copy link
Member Author

rlouf commented Sep 20, 2021

The mass matrix + step size that is used by PyMC3 leads to only divergent transitions; actually the largest step size at which we get an acceptance rate > .5 is orders of magnitude smaller than that used by PyMC3. Investigating why that's the case.

@twiecki
Copy link
Contributor

twiecki commented Sep 20, 2021

@rlouf Which mass matrix initialization method is this using? PyMC3's or Stan's? If PyMC3, @ricardoV94 actually found a problem there and @aseyboldt has worked on a new one that works much better.

@twiecki
Copy link
Contributor

twiecki commented Sep 20, 2021

pymc-devs/pymc#5004

@rlouf
Copy link
Member Author

rlouf commented Sep 20, 2021

Ah thanks, I'll check this out. I decided to check against numpyro's returned parameters in the end.

Nevertheless since PyMC3 samples fine with the parameters it obtains from warmup I shouldn't have any issue on my end.

@twiecki
Copy link
Contributor

twiecki commented Sep 20, 2021

@rlouf Can we add reviewing here as well?

@rlouf
Copy link
Member Author

rlouf commented Sep 20, 2021

Do you mean NBReview by reviewing?

@twiecki
Copy link
Contributor

twiecki commented Sep 22, 2021 via email

@rlouf
Copy link
Member Author

rlouf commented Sep 22, 2021

I guess that's @brandonwillard's decision to make.

@brandonwillard
Copy link
Member

Do we need to add an application to the aesara-devs org or something?

@rlouf
Copy link
Member Author

rlouf commented Oct 28, 2021

Starting over. Closing this PR and opening a new one.

@rlouf rlouf closed this Oct 28, 2021
@rlouf rlouf deleted the example-nuts branch October 28, 2021 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create non-trivial examples using aeppl's new log-probability features
3 participants