Implement Bayesian regression example from NumPyro in Pyro#3006
Implement Bayesian regression example from NumPyro in Pyro#3006arijeetchatterjee wants to merge 3 commits intopyro-ppl:devfrom
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
@arijc76 sorry I am so slow this week, great work! Here are some minor comments: Notebook
Rendering
Testing Your notebook is being executed correctly during CI (modulo reducing Details |
There may be some difference between the |
|
The custom def predict(post_samples, model, *args, **kwargs):
conditioned_model = poutine.condition(model, post_samples)
model_trace = poutine.trace(conditioned_model).get_trace(*args, **kwargs)
return model_trace.nodes["obs"]["value"]
def predict_fn(post_samples):
with pyro.plate("samples", num_samples):
return predict(post_samples, model, marriage=torch.tensor(dset.MarriageScaled.values, dtype=torch.float)) |
@eb8680 Thanks for this suggestion. |
@eb8680 When I run |
I can't reproduce your error, but you can tell Sphinx not to treat warnings as errors by overriding the |
Thanks @eb8680 [UPDATED] I have committed the notebook with the changes as mentioned above. Please take a look. Thanks. |
This PR contributes the implementation of a Bayesian regression example / tutorial from NumPyro to Pyro.
There is one issue that I am not able to address yet - I have to run the below cell before running the cells for Model 2 and Model 3. I did not face this issue with the NumPyro tutorial.
Please let me know what you think @eb8680