Indexing: the first invasive biopsy reads the scenario's event grades and keeps its rules #15
Reference in New Issue
Block a user
Delete Branch "fix/cacu-survival-index-event-grades"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What changes
The whole-frame version of the
primera_biopsia_invasoraindex (models/steps/indexing.py) looked for the single codeCARCINOMA_INVASOR, CaMa's. CaCu's survival indexes onevent_grades = ["CIS", "CARCINOMA"], so it found no biopsies, the indexed cohort had 0 members and training failed withzero-size array to reduction operation maximum. It also dropped what the per-patient version did for this kind: the two rules (no birth date; a death on or before the biopsy) and the prior observation threshold.It now:
index["event_grades"], withinvasive_code(defaultCARCINOMA_INVASOR) as the fallback, so CaMa, whose config listsCARCINOMA_INVASOR, is unchanged;Tests
tests/test_indexing.py: a new test pins the grades, the fallback, each rule and the attrition; it fails without the change. 11 pass.tests/cacu/test_cacu_survival.py: 9 of 10 pass (7 failed ondev). The tenth expects the pipeline diagram files, which need thegraphvizmodule, absent in this environment.tests/cama/test_survival.pyandtests/cama/test_recurrence.py: 22 pass. Five tests of the live figure (live.monthlymissing,curves()signature) fail the same way ondevwithout this change.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.