Skip to content
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

Add support for engine="auto" and bambi models in predictive explorer #455

Merged

Conversation

rohanbabbar04
Copy link
Contributor

@rohanbabbar04 rohanbabbar04 commented Jun 6, 2024

Closes #453
Closes #451

Description

  • Add support when engine="auto"
  • Add support for Bambi Models.(Still need to write a case when the Priors are not provided by the user)
  • Add docs and test.
  • I changed extract(idata, group="prior_predictive")[model.response_name].values to extract(idata, group="prior_predictive")[model.response_name].values.T. This I think I missed in pymc but I have corrected it in this PR.

Checklist

  • Code style is correct (follows pylint and black guidelines)
  • Includes new or updated tests to cover the new feature
  • New features are properly documented (with an example if appropriate)
  • Includes a sample plot to visually illustrate the changes (only for plot-related functions)
  • Widget states have been properly saved (only for notebooks with widgets) see for details.

@rohanbabbar04 rohanbabbar04 changed the title Add support for bambi models in predictive explorer Add support for engine="auto" and bambi models in predictive explorer Jun 6, 2024
preliz/internal/plot_helper.py Outdated Show resolved Hide resolved
preliz/internal/predictive_helper.py Outdated Show resolved Hide resolved
Comment on lines 29 to 30
A function with PreliZ distributions, PyMC distributions, or Bambi distributions.
The PreliZ distributions should call their rvs method.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A function with PreliZ distributions, PyMC distributions, or Bambi distributions.
The PreliZ distributions should call their rvs method.
A function with a PreliZ model, a PyMC model, or a Bambi model. See examples section below for details

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be done in a separated PR. We should add an example section to the docstring. The section should describe a minimal example using preliz, another using pymc and another bambi.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will create a PR for this...

@aloctavodia aloctavodia merged commit 3ed60f0 into arviz-devs:main Jun 7, 2024
4 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
2 participants