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

Update docstring and args #823

Merged
merged 6 commits into from
Jul 8, 2024

Conversation

GStechschulte
Copy link
Collaborator

This PR changes the docstring of kind in model.predict to reflect the changes in #804.

Additionally, in the interpret function predictions, we allow the user to compute posterior predictive samples. I updated the argument passed to model.predict from kind="pps" to kind="response" to reflect the changes in the merged PR above.

@GStechschulte GStechschulte changed the title Docstring and args Update docstring and args Jul 5, 2024
bambi/models.py Outdated Show resolved Hide resolved
bambi/models.py Outdated Show resolved Hide resolved
bambi/models.py Outdated
``posterior_predictive`` group to ``idata``. If any of these already exist, it will be
overwritten.
``idata`` with the predictions added. If ``kind="response_params"``, a new variable
with the name of the parent parameter, e.g. ``"mu"`` or ``"p"``is added to the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here it can be multiple parameters (e.g. both mu and sigma)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. I updated it to include 2 minimal examples (Gaussian and Bernoulli) so the user can reason what parameters to expect in the posterior group.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks!

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.94%. Comparing base (4cc3103) to head (1cdb1e2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #823      +/-   ##
==========================================
- Coverage   90.01%   89.94%   -0.08%     
==========================================
  Files          47       47              
  Lines        3967     3969       +2     
==========================================
- Hits         3571     3570       -1     
- Misses        396      399       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tomicapretto tomicapretto merged commit 3e80fb0 into bambinos:main Jul 8, 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
Development

Successfully merging this pull request may close these issues.

3 participants