Skip to content

Commit

Permalink
Merge pull request #29 from smart-on-fhir/mikix/bump
Browse files Browse the repository at this point in the history
Change "κ" to "Kappa" and bump version to 1.1.0
  • Loading branch information
mikix authored Apr 29, 2024
2 parents 492540b + 61e77c4 commit 08c726b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Chart Review

**Measure agreement between chart annotators.**
**Measure agreement between chart reviewers.**

Whether your chart annotations come from humans, machine-learning, or coded data like ICD-10,
`chart-review` can compare them to reveal interesting statistics like:
Expand Down Expand Up @@ -28,13 +28,13 @@ For guides on installing & using Chart Review,
$ ls
config.yaml labelstudio-export.json

$ chart-review accuracy jane john
accuracy-jane-john:
F1 Sens Spec PPV NPV TP FN TN FP Label
0.889 0.8 1.0 1.0 0.5 4 1 1 0 *
1.0 1.0 1.0 1.0 1.0 1 0 1 0 Cough
0 0 0 0 0 2 0 0 0 Fatigue
0 0 0 0 0 1 1 0 0 Headache
$ chart-review accuracy jill jane
accuracy-jill-jane:
F1 Sens Spec PPV NPV Kappa TP FN TN FP Label
0.667 0.75 0.6 0.6 0.75 0.341 3 1 3 2 *
0.667 0.5 1.0 1.0 0.5 0.4 1 1 1 0 Cough
1.0 1.0 1.0 1.0 1.0 1.0 2 0 1 0 Fatigue
0 0 0 0 0 0 0 0 1 2 Headache
```

## Contributing
Expand Down
2 changes: 1 addition & 1 deletion chart_review/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Chart Review public entry point"""

__version__ = "1.0.0"
__version__ = "1.1.0"
4 changes: 2 additions & 2 deletions chart_review/agree.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def score_matrix(matrix: dict, sig_digits=3) -> dict:
"Spec": round(spec, sig_digits),
"PPV": round(ppv, sig_digits),
"NPV": round(npv, sig_digits),
"κ": round(kappa, sig_digits),
"Kappa": round(kappa, sig_digits),
"TP": true_pos,
"FP": false_pos,
"FN": false_neg,
Expand Down Expand Up @@ -200,7 +200,7 @@ def csv_header(pick_label=False, as_string=False):
:param pick_label: default= None
:return: header
"""
as_list = ["F1", "Sens", "Spec", "PPV", "NPV", "κ", "TP", "FN", "TN", "FP"]
as_list = ["F1", "Sens", "Spec", "PPV", "NPV", "Kappa", "TP", "FN", "TN", "FP"]

if not as_string:
return as_list
Expand Down
2 changes: 1 addition & 1 deletion docs/accuracy.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ your accuracy scores will be printed to the console.
```shell
$ chart-review accuracy jill jane
accuracy-jill-jane:
F1 Sens Spec PPV NPV κ TP FN TN FP Label
F1 Sens Spec PPV NPV Kappa TP FN TN FP Label
0.667 0.75 0.6 0.6 0.75 0.341 3 1 3 2 *
0.667 0.5 1.0 1.0 0.5 0.4 1 1 1 0 Cough
1.0 1.0 1.0 1.0 1.0 1.0 2 0 1 0 Fatigue
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ has_children: true

# Chart Review

**Measure agreement between chart annotators.**
**Measure agreement between chart reviewers.**

Whether your chart annotations come from humans, machine-learning, or coded data like ICD-10,
Chart Review can compare them to reveal interesting statistics like:
Expand Down
10 changes: 5 additions & 5 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_accuracy(self):
"Spec": 0.6,
"PPV": 0.6,
"NPV": 0.75,
"κ": 0.341,
"Kappa": 0.341,
"TP": 3,
"FN": 1,
"TN": 3,
Expand All @@ -45,7 +45,7 @@ def test_accuracy(self):
"Spec": 1.0,
"TN": 1,
"TP": 1,
"κ": 0.4,
"Kappa": 0.4,
},
"Fatigue": {
"F1": 1.0,
Expand All @@ -57,7 +57,7 @@ def test_accuracy(self):
"Spec": 1.0,
"TN": 1,
"TP": 2,
"κ": 1.0,
"Kappa": 1.0,
},
"Headache": {
"F1": 0,
Expand All @@ -69,15 +69,15 @@ def test_accuracy(self):
"Spec": 0,
"TN": 1,
"TP": 0,
"κ": 0,
"Kappa": 0,
},
},
accuracy_json,
)

accuracy_csv = common.read_text(f"{tmpdir}/accuracy-jill-jane.csv")
self.assertEqual(
"""F1 Sens Spec PPV NPV κ TP FN TN FP Label
"""F1 Sens Spec PPV NPV Kappa TP FN TN FP Label
0.667 0.75 0.6 0.6 0.75 0.341 3 1 3 2 *
0.667 0.5 1.0 1.0 0.5 0.4 1 1 1 0 Cough
1.0 1.0 1.0 1.0 1.0 1.0 2 0 1 0 Fatigue
Expand Down

0 comments on commit 08c726b

Please sign in to comment.