This repository has been archived by the owner on Jan 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
doc: Update README, add Sphinx docs, add Jupyter notebook #9
Open
treszkai
wants to merge
41
commits into
strawlab:master
Choose a base branch
from
treszkai:develop/docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
(Using 2to3 tool)
(There was a Warning that I should increase it.)
Gives _identical_ results as the original hdi_of_mcmc()
xmin, xmax was unassigned if `bins is None`. The current version works whether bins is None, an integer, or a list/array.
… subscript) Without subscript it's less cluttered.
With only 100 points it looked way too segmented on a wide figure.
It shows up nicely on the output of pm.summary(trace). And display nu on the log scale, instead of displaying log(nu) on a linear scale.
Upgrade to Python 3, PyMC3, Matplotlib 3.0.0, restructure module a bit. PyMC3 required dropping Python 2 support.
+ add `best.summary()` as an alias for `pymc3.summary()` + remove unused variables in `make_model()` Planned functions for the next release of best: - `best.analyze_one` (for analysis of a single group) - `best.power` (for power analysis)
(This was the case for me on macOS.)
That would be required in high-dimensional spaces, where applying KDE is impossible.
======================== Make plot_data_and_prediction() suitable for API use - Use group_data and best_out parameters instead of data, means, stds, numos. - Add kwargs arguments for the hist and the posterior predictions. - Create new Axes if None was supplied. - Return created Axes. ======================== Improve aesthetics of plot_data_and_prediction() Biggest change: change to rwidth=1.0. Reason: The previous version (of rwidth=0.5) was *great* for integer data, but counter-intuitive for continuous data. ======================== refactor: Use plt.subplots() instead of fig.add_subplot() in plot_all() And share the x axis between the μ graphs and between the σ graphs. ======================== refactor: Simplify mode calculation, add hpd(); Move summary() to best.utils; remove calc_ prefixes
7bc780e
to
844b0a9
Compare
This way, plotting results is easier (there is no need to pass the data again to the plotting functions), and there is an OOP structure where objects lend themselves to certain actions. ======================== Change draw_zero:bool to ref_val:Optional[float] in best.plot. This matches the ArviZ API (apart from the possibility of None). ======================== Change variable_name to var_name in best.plot. This matches the ArviZ API closer (apart from the possibility of a list).
Sigma of t-distribution is not the std. dev. Instead, variance = nu / (nu - 2) * sigma ** 2 if nu > 2, and variance = infty if 1 < nu <= 2. Having even one sample of infinite std. dev. makes them incomparable, therefore in Model v2 we have: nu ~ Exp(1/27.5) + 2.5, and SD = sigma * (nu / (nu - 2)) ** 0.5 As a consequence, reduced the displayed limits of the std.devs in plot_posterior and plot_all to 99.5% of the samples.
Mock PyMC3 import for Sphinx
844b0a9
to
7e4e219
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add Sphinx docs, which is now online at best.readthedocs.io.
Add a Jupyter notebook for the
smart_drug.py
example.(This is part 4 of 4 pull requests that build on top of one another.)