Skip to content

Update sample code in the docs front page #5217

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
martinacantaro opened this issue Nov 21, 2021 · 2 comments · Fixed by #5059
Closed

Update sample code in the docs front page #5217

martinacantaro opened this issue Nov 21, 2021 · 2 comments · Fixed by #5059

Comments

@martinacantaro
Copy link
Contributor

martinacantaro commented Nov 21, 2021

Currently the front page of the documentation page displays a code snippet to show how easy it is to use PyMC. Update this code snippet to PyMC version 4

    import pymc3 as pm

    X, y = linear_training_data()
    with pm.Model() as linear_model:
        weights = pm.Normal("weights", mu=0, sigma=1)
        noise = pm.Gamma("noise", alpha=2, beta=1)
        y_observed = pm.Normal(
            "y_observed",
            mu=X @ weights,
            sigma=noise,
            observed=y,
        )

        prior = pm.sample_prior_predictive()
        posterior = pm.sample()
        posterior_pred = pm.sample_posterior_predictive(posterior)
@ricardoV94
Copy link
Member

Seems like the only thing is the pymc3 import?

@martinacantaro
Copy link
Contributor Author

Cool then! Wanted to make sure nothing else changed. Closing it now

@martinacantaro martinacantaro linked a pull request Nov 22, 2021 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants