Skip to content

fix(examples): update out-of-sample posterior predictive check in BART introduction - #911

Merged
aloctavodia merged 2 commits into
pymc-devs:mainfrom
kushagra240:fix/bart-out-of-sample-example
Nov 12, 2026
Merged

aloctavodia merged 2 commits into
pymc-devs:mainfrom
kushagra240:fix/bart-out-of-sample-example

Conversation

@kushagra240

Copy link
Copy Markdown
Contributor

Description

Fixes the out-of-sample regression evaluation in the BART_introduction example notebook.

Changes

  • Updated pm.sample_posterior_predictive parameters (sample_vars=["μ"], var_names=["y"]) when sampling out-of-sample data on model_oos_regression.
  • Constructed an az.InferenceData object via az.from_dict linking the out-of-sample posterior predictive draws with Y_test.
  • Updated az.plot_ppc_dist to compare against test observed data.
  • Synced changes cleanly between examples/bart/bart_introduction.myst.md and examples/bart/bart_introduction.ipynb.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@aloctavodia
aloctavodia merged commit 5249b69 into pymc-devs:main Nov 12, 2026
2 checks passed
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.

2 participants