Skip to content

Replaced numpy.random with the new random generator #150

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

Closed
wants to merge 2 commits into from

Conversation

KavyaJaiswal
Copy link
Contributor

Description

File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM.ipynb

Addresses issue #91 and aims to advance the notebook to the 'Best Practices' State.

The new code uses the new numpy generator instead of the numpy random. The code also has a ArviZ related addition of return_inferencedata=True

The PR has a (commented) try... except clause in the code. On un-commenting, it will ensure that users who have cloned pymc-examples repo will read their local copy of the data while also downloading the data from github for those who don't have a local copy.

try:
    sat_data = pd.read_csv("../data/Guber1999data.txt", ...)
except:
    sat_data = pd.read_csv(pm.get_data("Guber1999data.txt"), ...)

This PR also addresses the error message in the Hierarchical GLM section of the code. The error in the code is shown in the screenshots attached below. The fix for this error can be discussed and worked upon.

Error1
Error2
Error3

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant