Commit adb0ddd
authored
feat: publish each head's calibration in the catalog and on its bar (#263)
#261 gave every head its own decision threshold and a measured precision, but only a molecule
read exposed them. The head catalog — the thing you consult to ask "how good is this head?" —
still showed AUROC alone, which is precisely the number that hid the problem: AUROC is computed
on ranking and is blind to class imbalance, so `ginger` reads 0.979 there while being right 10%
of the time when it fires.
/api/heads now carries threshold, precision, recall, n_pos and confident_capable per head, for
aroma and mouthfeel alike. A head that fires at 0.16 and is right 6% of the time says so on its
own row, not only buried inside one molecule's read.
Also fixes headBar, which still hard-coded 0.5 to decide whether a bar was lit. That silently
disagreed with the calibrated mouthfeel heads: `cooling` fires at 0.64 and `astringent` at 0.71,
so a score of 0.55 was being drawn as firing when the head says it is not. Bars now read the
head's own threshold, show where that bar sits and how precise it is there, and hatch the fill
for indicative heads. Tox heads keep the flat 0.5 — they are not calibrated and, with hundreds
of positives each, were never shy.
Taste heads are published with an explicit threshold of 0.5 rather than a null, so a consumer
never has to guess whether the field is missing or genuinely flat.
Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>1 parent 40caeb7 commit adb0ddd
2 files changed
Lines changed: 34 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1290 | 1290 | | |
1291 | 1291 | | |
1292 | 1292 | | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
1293 | 1303 | | |
1294 | | - | |
| 1304 | + | |
| 1305 | + | |
1295 | 1306 | | |
1296 | 1307 | | |
1297 | 1308 | | |
1298 | | - | |
| 1309 | + | |
| 1310 | + | |
1299 | 1311 | | |
1300 | 1312 | | |
1301 | | - | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1302 | 1316 | | |
1303 | 1317 | | |
1304 | 1318 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
| 288 | + | |
287 | 289 | | |
288 | 290 | | |
289 | 291 | | |
| |||
1867 | 1869 | | |
1868 | 1870 | | |
1869 | 1871 | | |
1870 | | - | |
1871 | | - | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
1872 | 1879 | | |
1873 | | - | |
1874 | | - | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
1875 | 1885 | | |
1876 | | - | |
| 1886 | + | |
1877 | 1887 | | |
1878 | 1888 | | |
1879 | 1889 | | |
1880 | 1890 | | |
1881 | 1891 | | |
1882 | 1892 | | |
1883 | | - | |
| 1893 | + | |
| 1894 | + | |
1884 | 1895 | | |
1885 | 1896 | | |
1886 | 1897 | | |
| |||
0 commit comments