Closed rlouf closed 3 years ago
@brandonwillard this is ready for review.
Should we cut a release with an example notebook and maybe the comparison with PyMC3's sampler or should we move on to NUTS immediately?
Should we cut a release with an example notebook and maybe the comparison with PyMC3's sampler or should we move on to NUTS immediately?
Yeah, let's start with a simple example notebook. From there we can dig into the details and iron out any glaring performance issues before things get more involved.
FYI: I just rebased this branch so that it picks up all the repository changes.
Merging #5 (fff2571) into main (201082f) will not change coverage. The diff coverage is
100.00%
.:exclamation: Current head fff2571 differs from pull request most recent head af861b4. Consider uploading reports for the commit af861b4 to get more accurate results
@@ Coverage Diff @@
## main #5 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 5 +1
Lines 64 97 +33
Branches 3 3
=========================================
+ Hits 64 97 +33
Impacted Files | Coverage Δ | |
---|---|---|
aehmc/hmc.py | 100.00% <100.00%> (ø) |
|
aehmc/metrics.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 201082f...af861b4. Read the comment docs.
It does it well enough to recover the parameters of the linear regression, but that's not a very quantitative assessment. I think Stan and tfp
have some good tests for that and we could get some inspiration there; HMC is simple enough to debug when there's something wrong, but errors in NUTS can be very subtle and hard to catch.
You can review the notebook, good on my end. In the meantime I'm switching to NUTS.
Can we merge this?
This PR adds the HMC kernel to aeasa-hmc. I did not factor the code as much as I did with BlackJAX, I will do it when implementing NUTS.