Repository navigation
Add KeyClass weakly-supervised clinical text classifier - #1751
ayangaur26 wants to merge 1 commit into
Conversation
|
Why this PR has Please comment here with what your PR does that the others don't. Whichever isn't picked can contribute its unique parts on top of the chosen one, using the merged |
Test CoverageTotal: 88.33% (58564 / 66301 lines)
|
|
Duplicate: KeyClass is also added by #1408, which was opened earlier and is still under review. We're still running an AI review on this PR so you get feedback on your code, but we're unlikely to merge a second implementation. If your version fixes or adds something the existing one lacks, a focused follow-up PR that extends it is very welcome; please link this PR from it. Before opening a PR, please check master and open PRs for the same component. |
|
/review |
Contributor
Type of Contribution
KeyClass(pyhealth.models.KeyClass)Paper Reference
High-Level Description
Implements
KeyClass(BaseModel)for weakly-supervised clinical text classification:use_negation_filter).aggregation="generative") or unweighted majority vote (aggregation="majority_vote").fit_weak_supervision()and supports standard PyHealthforward()/Trainerworkflows.Includes synthetic unit tests (
tests/core/test_keyclass.py) and an ablation study onMIMIC3ICD9CategoryClassification(examples/mimic3_icd9_category_classification_keyclass.py) comparingroberta-basevs.Bio_ClinicalBERT, majority vote vs. generative aggregation, and NegEx negation filtering.File Guide
pyhealth/models/keyclass.py:KeyClassmodel and weak-supervision utilitiespyhealth/models/__init__.py: ExportKeyClasstests/core/test_keyclass.py: Fast synthetic unit testsdocs/api/models/pyhealth.models.KeyClass.rst&docs/api/models.rst: API documentationexamples/mimic3_icd9_category_classification_keyclass.py: MIMIC-III ablation study script