-
Notifications
You must be signed in to change notification settings - Fork 0
245 add updated functions create calibration curve and create calibration curve times #269
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
uriahf
merged 22 commits into
main
from
245-add-updated-functions-create_calibration_curve-and-create_calibration_curve_times
Dec 24, 2025
Merged
245 add updated functions create calibration curve and create calibration curve times #269
uriahf
merged 22 commits into
main
from
245-add-updated-functions-create_calibration_curve-and-create_calibration_curve_times
Dec 24, 2025
Conversation
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
…ame_if_array` argument
Adds a new `smooth` option to the `calibration_type` parameter in the `create_calibration_curve` function. This option generates a smoothed calibration curve using a LOESS smoother, replicating the functionality of the R `rtichoke` package. The implementation includes: - Adding `statsmodels` as a new dependency for the LOESS implementation. - A new helper function `_calculate_smooth_curve` to perform the smoothing and interpolation. - Updates to the plotting logic to render the smoothed curve. - New tests to verify the functionality of the smoothed curve, including an edge case for a single unique probability value. - A fix for a `DuplicateError` in the existing decile calculation when handling uniform probability distributions.
…302425152341313956 feat: Add smoothed calibration curve
This commit introduces a new function, `create_calibration_curve_times`, for generating time-dependent calibration curves. This function provides an interactive calibration curve plot with a slider to adjust the time horizon. It also handles administrative censoring and various data filtering heuristics for competing risks. Key changes: - Added `create_calibration_curve_times` function to `rtichoke/calibration/calibration.py`. - Implemented helper functions for data preparation (`_create_calibration_curve_list_times`) and plotting (`_create_plotly_curve_from_calibration_curve_list_times`). - Added a new helper function `_apply_heuristics_and_censoring` to handle censoring and competing risk logic. - Added unit tests for the new heuristic logic in `tests/test_heuristics.py`. - Added a smoke test for the new `create_calibration_curve_times` function in `tests/test_calibration_times.py`. - Refactored hover text logic into a shared helper function to reduce code duplication.
…703731330045434 feat: Add create_calibration_curve_times function
This commit improves the data loading logic for calibration curves to be more robust and flexible. The previous implementation was too strict about the types of input it accepted and was not robust enough in handling different data shapes. This commit corrects the data loading logic to handle different input types (lists and NumPy arrays) and data shapes for both single and multiple population scenarios.
This commit improves the data loading logic for calibration curves to be more robust and flexible. The previous implementation was too strict about the types of input it accepted and was not robust enough in handling different data shapes. This commit corrects the data loading logic to handle different input types (lists and NumPy arrays) and data shapes for both single and multiple population scenarios.
…703731330045434 Feat/calibration curve times 1091703731330045434
This commit resolves all type errors reported by the `ty` type checker, ensuring that the project's type hints are correct and consistent. Additionally, it updates the `AGENTS.md` file to include instructions on how to run `ty` for future development.
Pass ty check and update AGENTS.md
This commit refactors the `helpers` module into a `processing` module with a more logical structure. The `sandbox_observable_helpers.py` file has been split into three new modules: `adjustments.py`, `combinations.py`, and `transforms.py`. This change improves the maintainability and readability of the codebase.
…0076305909 Refactor: helpers module
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.
No description provided.