-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update notebooks with current API #1445
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
Conversation
" s = GaussianRandomWalk('s', sigma ** -2, shape=n)\n", | ||
"\n", | ||
" r = StudentT('r', nu, lam=exp(-2 * s), observed=returns)\n", | ||
" r = StudentT('r', nu, lam=np.exp(-2 * s), observed=returns)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that be pymc3.math.exp
?
flat_names = {v: create_flat_names(v, shape) | ||
for v, shape in var_shapes.items() | ||
if not v.endswith('_')} | ||
flat_names = {v: create_flat_names(v, shape) for v, shape in var_shapes.items()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this reverting #1367? Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you mentioned that. Perhaps we can add a kwarg
like hide_transformed_vars
?
d473af1
to
56689eb
Compare
@@ -23,11 +23,11 @@ def trace_to_dataframe(trace, chains=None, flat_names=None): | |||
if flat_names is None: | |||
flat_names = {v: create_flat_names(v, shape) | |||
for v, shape in var_shapes.items() | |||
if not v.endswith('_')} | |||
if not hide_transformed_vars or not v.endswith('_')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
equivalent to the more readable: if not (hide_transformed_vars and v.endswith('_'))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ColCarroll If you changes this we can merge this.
Missed that one, sorry! |
👍 |
Mostly making sure imports still worked, restarting kernels and running the code all the way through. Did not check much for accuracy or soundness of approaches.
The only substantive change was in
trace_to_dataframe
, which now includes transformed variables. One of the notebooks requires this to run, and it made sense to me that a user can filter columns more easily than recreating the dropped ones, but I can revert that if there are objections.This was all run in python 3.5, using the environment we build on travis, with a few extra libraries installed manually if the notebook required it.
Fixes #1444 , except for
pmf-pymc
, which has a separate issue (#830).