Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a consistent API overhaul for halfmoon functions, implementing three distinct function families: bal_*() for single-weight operations, check_*() for multi-weight comparisons, and plot_*() for visualization. The changes also add automatic plotting methods and improve naming schemes across the package.
- Renames core functions to follow consistent naming patterns (
roc_curve→check_model_roc_curve,plot_calibration→plot_model_calibration,qq→check_qq) - Introduces new
bal_*()functions for single-weight operations (bal_qq,bal_model_auc,bal_model_roc_curve,bal_ess) - Adds autoplot methods and S3 plot methods for all halfmoon object classes with appropriate class annotations
Reviewed Changes
Copilot reviewed 68 out of 88 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/testthat/test-plot_roc.R | Updates function calls from old to new naming scheme |
| tests/testthat/test-plot_calibration.R | Renames plot_calibration to plot_model_calibration throughout |
| tests/testthat/test-geom_roc.R | Fixes data preparation with explicit numeric conversion |
| tests/testthat/test-geom_qq2.R | Improves data transformation and adds seed for reproducible tests |
| tests/testthat/test-geom_mirrored_histogram.R | Minor test output change for consistency |
| tests/testthat/test-geom_calibration.R | Updates function names and adds comprehensive calibration tests |
| tests/testthat/test-compute_qq.R | Renames qq to check_qq throughout with updated documentation |
| tests/testthat/test-check_model_auc.R | Comprehensive rename from roc_curve to check_model_roc_curve |
| tests/testthat/test-bal_*.R | New test files for bal_*() function family |
| tests/testthat/test-autoplot-methods.R | New tests for autoplot and plot methods |
| R/*.R | Implementation of new function families and autoplot methods |
| man/*.Rd | Updated documentation reflecting new naming scheme |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a family of functions that are consistent:
bal_*(),check_*(), andplot_*()as well as auto plotting methods and clearer name schemes