-
Notifications
You must be signed in to change notification settings - Fork 21
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
major rewrite #44
Merged
Merged
major rewrite #44
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hopefully the new registry will be ready by this PR is done.
Codecov Report
@@ Coverage Diff @@
## master #44 +/- ##
==========================================
- Coverage 97.21% 89.94% -7.28%
==========================================
Files 7 8 +1
Lines 287 348 +61
==========================================
+ Hits 279 313 +34
- Misses 8 35 +27
Continue to review full report at Codecov.
|
- Move all abstract trajectory API and samplers into trees.jl. - Use bit flags for directions.
Internal checks: rule out calling is_turning on a leaf.
Remove proposal type, factor out the logic of biased progressive sampling.
Rewrite unit tests with log probabilities.
Incidentally: cosmetic cleanup of test code.
- make kinetic energy the first slot/type parameter in Hamiltonian - longer function, slot, and type names, without abbreviations - fix LogDensityProblems API use bugss - rename neg_energy to logdensity - support diagonal metric without forming a lower triangular W - Hamiltonian tests and support functions cleanup, random z in rand_Hz - get rid of some cruft in tests
Rename structs and internal functions.
No substantial code changed, just formatting, moved diagnostic functions to appropriate file.
1. store position with evaluated log density and gradient in a single object 2. remove redundant Hamiltonian functionality 3. mcmc stages with adaptation state replace tuning sequence 4. add optimization before initial stepsize finding initial stepsize 5. add diagonal metric (as the default) 6. simplify μ initialization 7. allow higher acceptance rate for initial stepsize
- replace `sample` with `chain` - replace `adaptation` with `warmup` - add missing docstrings - rename higher-level functions - add API change warnings
also factor out common test code for interactive use
as we are not testing mcmc logs
- propagate invalid tree information upwards and save it for diagnostics, refactor tree code - just collect visited node information (practically acceptance), without divergence - use log of total acceptance rate for more accurate calculation - refactor diagnostics: don't use DataStructures for simple counting, rename statistics summary function, change quantiles - fix reporter propagation bug - longer runs for simple mcmc diagnostics (fewer false positives) - incidental docstring fixes
(may bring it back when tested)
PR already huge, merging to master, TBC. |
This was referenced Aug 19, 2019
Closed
Merged
Closed
tpapp
added a commit
that referenced
this pull request
Aug 20, 2019
- bump Documenter project version - updated documentation for #44 and subsequent changes - don't document low-level API - include a worked example - deploy docs using 1.2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addressing many issues, mostly as outlined in #30.
Organized as a set of smaller PRs, merged into this one.API changes
major API change: entry point is now
mcmc_with_warmup
refactor warmup code, add initial optimizer
use the LogDensityProblems v0.9.0 API
use Julia's Logging module for progress messages
diagnostics moved to
DynamicHMC.Diagnostics
report turning and divergence positions
add
leapfrog_trajectory
for explorationImplementation changes
factor out the tree traversal code
abstract trajectory interface
separate random and non-random parts
stricter and more exact unit tests
refactor Hamiltonian code slightly
caching is now in EvaluatedLogDensity
functions renamed
misc
remove dependency on DataStructures, Suppressor
cosmetic changes to dual averaging code
large test cleanup
TODO
Warmup and diagnostics postponed after this PR, see #54.