SamAgnoli commited on
Commit
4f3c19c
·
verified ·
1 Parent(s): 1ad9dd1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -77,6 +77,7 @@ print(clf({"text": "The cat is sitting on top of the bookshelf.", "text_pair": "
77
  - **Split:** group-aware 70/15/15 by speaker session (no session spans splits)
78
  - **Hyperparameters:** 2 epochs · lr 2e-5 · batch 16 · weight decay 0.01 · warmup 0.1 ·
79
  max_length 128 · fp16 · seed 42 · best checkpoint by F1
 
80
  - **Framework:** 🤗 Transformers
81
 
82
  ## Evaluation (held-out test set)
@@ -85,18 +86,17 @@ Reported for two views: **dictionary candidates only** (the meaningful view —
85
  dictionary flags as plausibly spatial) and **overall** (every word, dominated by trivially
86
  non-spatial tokens).
87
 
88
- ### Candidates only — 799 words (570 not-spatial, 229 spatial)
89
 
90
  | class | precision | recall | F1 | support |
91
  |---|---|---|---|---|
92
- | not_spatial | 0.958 | 0.925 | 0.941 | 570 |
93
  | spatial | 0.827 | 0.900 | 0.862 | 229 |
94
 
95
- **Overall accuracy: 0.917** (733 of 799 words correct) · macro-F1 0.901 · Cohen's κ 0.803
96
 
97
  Reading it per class: the model catches **90.0%** of truly-spatial words (recall) at **82.7%**
98
- precision; for non-spatial words it's 92.5% recall at 95.8% precision. (In clinical terms:
99
- sensitivity 0.900, specificity 0.925, PPV 0.827, NPV 0.958.)
100
 
101
  ### Overall — every word, 5,207 tokens
102
 
@@ -104,13 +104,13 @@ accuracy **0.987** · spatial-F1 **0.862** · Cohen's κ **0.855**
104
 
105
  > The two views share the *same* spatial predictions (229 spatial words, same 206 caught). Only
106
  > the non-spatial pool differs, which is why "overall" accuracy looks higher — it's padded with
107
- > ~4,400 easy non-candidate words the model trivially gets right. Judge the model by the
108
  > **candidates-only** view.
109
 
110
  ## Calibration
111
 
112
  Raw probabilities are over-confident, so a post-hoc **temperature scaling** factor
113
- (**T = 1.816**, fit on the validation candidates) rescales them into a calibrated `P(spatial)`
114
  you can read literally. Temperature scaling is monotonic, so the hard 0/1 decision is unchanged.
115
  See section 7.5 of the repo.
116
 
 
77
  - **Split:** group-aware 70/15/15 by speaker session (no session spans splits)
78
  - **Hyperparameters:** 2 epochs · lr 2e-5 · batch 16 · weight decay 0.01 · warmup 0.1 ·
79
  max_length 128 · fp16 · seed 42 · best checkpoint by F1
80
+ - **Class imbalance:** no class weighting or resampling. The dictionary gate already raises the positive rate from ~4% of all words to ~30% of candidates, and checkpoint selection used minority-class F1 rather than accuracy.
81
  - **Framework:** 🤗 Transformers
82
 
83
  ## Evaluation (held-out test set)
 
86
  dictionary flags as plausibly spatial) and **overall** (every word, dominated by trivially
87
  non-spatial tokens).
88
 
89
+ ### Candidates only — 622 words (393 not-spatial, 229 spatial)
90
 
91
  | class | precision | recall | F1 | support |
92
  |---|---|---|---|---|
93
+ | not_spatial | 0.938 | 0.891 | 0.914 | 393 |
94
  | spatial | 0.827 | 0.900 | 0.862 | 229 |
95
 
96
+ **Overall accuracy: 0.894** (556 of 622 words correct) · macro-F1 0.888 · Cohen's κ 0.776
97
 
98
  Reading it per class: the model catches **90.0%** of truly-spatial words (recall) at **82.7%**
99
+ precision; for non-spatial words it's 89.1% recall at 93.8% precision. (sensitivity 0.900, specificity 0.891, PPV 0.827, NPV 0.938.)
 
100
 
101
  ### Overall — every word, 5,207 tokens
102
 
 
104
 
105
  > The two views share the *same* spatial predictions (229 spatial words, same 206 caught). Only
106
  > the non-spatial pool differs, which is why "overall" accuracy looks higher — it's padded with
107
+ > ~4,600 easy non-candidate words the model trivially gets right. Judge the model by the
108
  > **candidates-only** view.
109
 
110
  ## Calibration
111
 
112
  Raw probabilities are over-confident, so a post-hoc **temperature scaling** factor
113
+ (**T = 1.887**, fit on the validation candidates) rescales them into a calibrated `P(spatial)`
114
  you can read literally. Temperature scaling is monotonic, so the hard 0/1 decision is unchanged.
115
  See section 7.5 of the repo.
116