Skip to content

combining ppc_error_scatter_avg_vs_x with ppc_error_scatter_avg(x = x) #367

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

Merged
merged 4 commits into from
Aug 14, 2025

Conversation

behramulukir
Copy link
Collaborator

@behramulukir behramulukir commented Aug 13, 2025

In #361, we discussed the possibility of rearranging plots for easier usage. As I mentioned in the sub-issue #364, one of the ideas I had was combining ppc_error_scatter_avg_vs_x() with ppc_error_scatter_avg(x = x). The simple idea behind this is that these two functions are fairly similar, and all ppc_error_scatter_avg_vs_x() does is format the x variable appropriately and then call ppc_error_scatter_avg(). Therefore, I think combining these two functions would result in a smoother user experience by reducing the number of similar functions.

This PR addresses my work on that idea.

  • add x argument
  • update the tests
  • update the documentation
  • deprecate ppc_error_scatter_avg_vs_x()

Results

To show the results of the work, I re-created the examples used at PPC-errors documentation.

y <- example_y_data()
yrep <- example_yrep_draws()
x <- example_x_data()

ppc_error_scatter_avg(y, yrep)
scatter_avg
ppc_error_scatter_avg_vs_x(y, yrep, x)

Warning message:
In ppc_error_scatter_avg_vs_x(y, yrep, x) :
  Use ppc_error_scatter_avg(x = x) instead of ppc_error_scatter_avg_vs_x().
scatter_avg_vs_x
ppc_error_scatter_avg(y, yrep, x)
scatter_avg_x

It seems like functions are working as intended, producing correct plots, and ppc_error_scatter_avg_vs_x() is producing the correct deprecation warning.

@behramulukir behramulukir self-assigned this Aug 13, 2025
@behramulukir behramulukir linked an issue Aug 13, 2025 that may be closed by this pull request
@behramulukir behramulukir marked this pull request as ready for review August 13, 2025 13:07
@codecov-commenter
Copy link

codecov-commenter commented Aug 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.60%. Comparing base (5372336) to head (6a583ed).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #367   +/-   ##
=======================================
  Coverage   98.60%   98.60%           
=======================================
  Files          35       35           
  Lines        5661     5672   +11     
=======================================
+ Hits         5582     5593   +11     
  Misses         79       79           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TeemuSailynoja TeemuSailynoja merged commit 0efe3ec into master Aug 14, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Combine ppc_error_scatter_avg and ppc_error_scatter_avg_vs_x
3 participants