Repository navigation
fix: use configured label names in survival crossval output - #183
Open
chenyangsu wants to merge 1 commit into
Open
chenyangsu wants to merge 1 commit into
chenyangsu wants to merge 1 commit into
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
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.
Running survival cross-validation with custom
time_label="OS_MONTHS"andstatus_label="OS_EVENT"writes columns['PATIENT', 'pred_score', 'time', 'event', ...]tosplit-*/patient-preds.csv, so passing those CSVs tocompute_stats_raises aKeyErroronOS_MONTHS. PR #170 (for #169) addedtime_labelandstatus_labelarguments to_to_survival_prediction_dfand passed them indeploy.py, whilecrossval.pystill calls_to_survival_prediction_dfwith the default names.Pass
time_label=config.time_label or "time"andstatus_label=config.status_label or "event"incrossval.py, and add a regression test running survival cross-validation intocompute_stats_. Happy to fold the test intotests/test_crossval.pyif you prefer.Testing:
pytest tests/test_crossval_survival_labels.py tests/test_statistics.py tests/test_model.py(19 passed);ruff checkandruff format --check --target-version=py313pass.