Add time-dependent concordance metrics#24
Conversation
|
@codex review |
There was a problem hiding this comment.
Pull request overview
This PR adds time-dependent concordance scoring to SurvivalEVAL (including Antolini-style survival-curve scoring and IPCW-weighted variants), extends the evaluator API to support hazard-rate–based risk scoring, and updates docs/versioning for the 0.8.0 release.
Changes:
- Introduces
concordance_time_dependentplus shared concordance utilities (_concordance_utils) and corresponding evaluator methodSurvivalEvaluator.concordance_time_dependent. - Adds consistent target-time validation (
validate_time_points) and a new hazard-rate extraction path (predict_multi_hazards_from_curve) for crossing-hazards concordance use cases. - Expands test coverage and refreshes README metric tables + bumps version/changelog to 0.8.0.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_util.py | Adds unit tests for validate_time_points validation behavior. |
| tests/test_time_dependent_concordance.py | New end-to-end and brute-force parity tests for time-dependent concordance counting and IPCW behavior. |
| tests/test_evaluator.py | Adds evaluator-level validation tests and hazard extraction tests. |
| tests/test_concordance.py | Updates tests to use refactored concordance count utilities. |
| SurvivalEVAL/version.py | Bumps package version to 0.8.0. |
| SurvivalEVAL/NonparametricEstimator/SingleEvent/Fiducial.py | Modernizes typing annotations (Tuple → tuple). |
| SurvivalEVAL/Evaluator.py | Adds time-dependent concordance API + hazard prediction helper + stricter curve/grid validation. |
| SurvivalEVAL/Evaluations/util.py | Adds validate_time_points and routes existing probability helpers through it. |
| SurvivalEVAL/Evaluations/TimeDependentConcordance.py | Implements time-dependent concordance (Antolini/Naive/IPCW) and pair counting. |
| SurvivalEVAL/Evaluations/OtherMetrics.py | Modernizes typing annotations (Tuple → tuple). |
| SurvivalEVAL/Evaluations/Concordance.py | Factors shared concordance machinery into _concordance_utils and updates error types. |
| SurvivalEVAL/Evaluations/_concordance_utils.py | New shared utilities for concordance pair counting/finalization. |
| SurvivalEVAL/init.py | Exposes new concordance_time_dependent at package top-level and adjusts exports. |
| README.md | Rebuilds metric reference sections with tables and adds time-dependent concordance documentation. |
| CHANGELOG.md | Adds 0.8.0 release notes describing the new time-dependent concordance functionality. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 38d5094511
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 825632d7da
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5f35078b6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Description
Adds time-dependent concordance support for survival-curve and hazard-rate predictions, updates the evaluator/API surface, and prepares the documentation and version metadata for the next release.
Updates
concordance_time_dependentandSurvivalEvaluator.concordance_time_dependentfor Antolini-style survival-curve scoring and IPCW-based time-dependent concordance.Fixes
N/A
Mandatory Checklist
All new or modified features have corresponding test cases.
I have run all the tests, using
pytest, and this is the log I get:conda run -n SurvEVAL pytest 183 passed, 18 warnings in 5.45sAll new functions, classes, and modules contain clear docstrings and inline comments.
All jupyter notebooks are runnable with expected results.
Not run; no notebook changes.
I have reformatted and ran
isort .andblack .(in this same order) on the codebase.I have updated the README and added or edited any new scripts to the integration tests.
I have ensured sufficient coverage on the newly implemented features.
I have made sure that both the
requirements.txtandpyproject.tomlfiles are updated according to the newly introduced dependencies.No new dependencies introduced.
Paste the remaining code TODOs using the command
grep -rI --color=auto --exclude-dir={.git,__pycache__,env_folder,.venv,venv,.cache,output,.github,} 'TODO' .here, and explain them if necessary:Existing TODOs are unrelated to this PR.