Wanding Zhou commited on
Commit
2f8ebda
Β·
1 Parent(s): 25352fb

README: bank classifiers, held-out mouse accuracy, classify argument order

Browse files

- rows and a size table for the four bank models; _full supersedes the
routing trees for new work
- mm10_brain_{full,lite} scored on 49,113 Liu 2021 cells outside the
training cap: 0.9660 / 0.9482 micro
- every classify example now reads model-first, matching the binary

Files changed (1) hide show
  1. README.md +55 -2
README.md CHANGED
@@ -25,7 +25,7 @@ runs directly β€” no separate annotation files.
25
  # fetch one model (or --local-dir models to grab all)
26
  hf download zhou-lab/methscope hg38_celltype.clfx --local-dir .
27
 
28
- methscope classify query.cg hg38_celltype.clfx # cell type / label
29
  methscope upscale -o out.cg hg38_wg.updecx query.cg # genome-wide CpG upscaling
30
  methscope inspect hg38_sex.clfx # framework, labels, features
31
  ```
@@ -55,9 +55,62 @@ upscale input + truth) live in the GitHub repo
55
  | `hg38_wg.updecx` | whole-genome CpG upscaling | `UPDEC2` | all 29,401,795 hg38 CpGs; v5 primary upscaler (2.8 GB). Its decoder upgrade is deferred to v9. |
56
  | `hg38_10k1.updecx` | CpG upscaling (single block) | MLP decoder | block 10k1 (10,000 CpGs); small demo model |
57
  | `hg38_celltype.clfx` | cell-type annotation (human) | xgboost, routing tree | 33 human cell types; 11-node tree + 3 satellites; cross-cohort accuracy **0.903** β€” see below |
 
 
 
 
58
  | `mm10_celltype_brain.clfx` | cell-type annotation (mouse **brain**) | xgboost, routing tree | 41 mouse-brain cell types; 4-node tree + 134 satellites; **class-balanced accuracy 0.969 Β± 0.001** at native coverage (10-fold CV). Brain only β€” a non-brain cell is forced onto the nearest brain type |
59
  | `hg38_sex.clfx` | sex prediction | logistic | Female, Male (XCI `Xa_hi`/`Xa_lo` markers) |
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  `methscope inspect <model>` prints the exact framework, full label list, and (for
62
  linear models) per-feature weights. Classifiers carry a required framework `kind`
63
  mark (`tree` / `violation` / `threshold` / `logistic`); `classify` rejects an
@@ -155,7 +208,7 @@ so a reference *is* a per-class prediction already. The rule just asks which
155
  class the query contradicts least, and there is nothing to fit:
156
 
157
  ```sh
158
- methscope classify --framework violation query.cg ref.mrmp
159
  ```
160
 
161
  ```
 
25
  # fetch one model (or --local-dir models to grab all)
26
  hf download zhou-lab/methscope hg38_celltype.clfx --local-dir .
27
 
28
+ methscope classify hg38_celltype.clfx query.cg # cell type / label
29
  methscope upscale -o out.cg hg38_wg.updecx query.cg # genome-wide CpG upscaling
30
  methscope inspect hg38_sex.clfx # framework, labels, features
31
  ```
 
55
  | `hg38_wg.updecx` | whole-genome CpG upscaling | `UPDEC2` | all 29,401,795 hg38 CpGs; v5 primary upscaler (2.8 GB). Its decoder upgrade is deferred to v9. |
56
  | `hg38_10k1.updecx` | CpG upscaling (single block) | MLP decoder | block 10k1 (10,000 CpGs); small demo model |
57
  | `hg38_celltype.clfx` | cell-type annotation (human) | xgboost, routing tree | 33 human cell types; 11-node tree + 3 satellites; cross-cohort accuracy **0.903** β€” see below |
58
+ | `hg38_celltype_full.clfx` | cell-type annotation (human), **bank-full** | xgboost, pooled bank | 63 human cell types; a 1,981-set MRMP chain (LCA binstrings + a calibrated resolver for every class pair) scored by ONE pooled booster, no routing; **class-balanced 0.9544 / micro 0.9569** over 84,601 held-out cells, ten-fold CV. Supersedes `hg38_celltype.clfx` for new work |
59
+ | `hg38_celltype_lite.clfx` | cell-type annotation (human), **bank-lite** | xgboost, pooled bank | the same 63 classes and the same architecture as `_full`, with resolvers only for the pairs no binstring separates: 233 sets / 208 resolvers against 1,981 / 1,953. **51 MB** |
60
+ | `mm10_brain_full.clfx` | cell-type annotation (mouse **brain**), **bank-full** | xgboost, pooled bank | 41 mouse-brain classes; an 837-set MRMP chain (LCA binstrings + a calibrated resolver for every class pair) scored by ONE pooled booster, no routing; **class-balanced 0.9746 / micro 0.9720** over 54,447 held-out cells, ten-fold CV (the tree below: 0.969). Supersedes `mm10_celltype_brain.clfx` for new work. Brain only |
61
+ | `mm10_brain_lite.clfx` | cell-type annotation (mouse **brain**), **bank-lite** | xgboost, pooled bank | 41 mouse-brain classes; 135 sets / 117 resolvers; **27 MB**. Brain only, like `mm10_celltype_brain.clfx` |
62
  | `mm10_celltype_brain.clfx` | cell-type annotation (mouse **brain**) | xgboost, routing tree | 41 mouse-brain cell types; 4-node tree + 134 satellites; **class-balanced accuracy 0.969 Β± 0.001** at native coverage (10-fold CV). Brain only β€” a non-brain cell is forced onto the nearest brain type |
63
  | `hg38_sex.clfx` | sex prediction | logistic | Female, Male (XCI `Xa_hi`/`Xa_lo` markers) |
64
 
65
+ ### Bank classifiers: `_full` and `_lite`, and the tree they replace
66
+
67
+ New in v9. A **bank** classifier does not route: its MRMP is a flat set of
68
+ hierarchical LCA binstrings plus redrawn, LOO-calibrated *resolvers* for close
69
+ class pairs, all scored by a single pooled booster. `_full` and `_lite` are the
70
+ same build one flag apart β€” how many pairs get a resolver.
71
+
72
+ | | sets | resolvers | size |
73
+ | --- | --- | --- | --- |
74
+ | `hg38_celltype_full.clfx` | 1,981 | 1,953 β€” every class pair | 154 MB |
75
+ | `hg38_celltype_lite.clfx` | 233 | 208 β€” only pairs no binstring separates | 51 MB |
76
+ | `mm10_brain_full.clfx` | 837 | 820 β€” every class pair | 68 MB |
77
+ | `mm10_brain_lite.clfx` | 135 | 117 | 27 MB |
78
+
79
+ **Accuracy.** Ten-fold CV of the recipe: human `_full` class-balanced 0.9544 /
80
+ micro 0.9569 over 84,601 cells; mouse `_full` 0.9746 / 0.9720 over 54,447.
81
+ The shipped mouse bytes were also scored on 49,113 Liu 2021 cells that never
82
+ entered the model (the cells beyond the 2,000-per-class training cap, so 18 of
83
+ the 41 classes, the large cortical ones included):
84
+
85
+ | | micro | class-balanced (18) |
86
+ | --- | --- | --- |
87
+ | `mm10_brain_full.clfx` | 0.9660 | 0.9707 |
88
+ | `mm10_brain_lite.clfx` | 0.9482 | 0.9595 |
89
+
90
+ The lite model's cost is concentrated in the cortical IT layers (IT-L23
91
+ 0.946 β†’ 0.924, IT-L5 0.951 β†’ 0.915); elsewhere the two are within noise. The
92
+ human `_lite` has no held-out number: the human bank used every labeled cell.
93
+ Use `_full` when the number matters; use `_lite` when its size does, and
94
+ validate on your own data before relying on it.
95
+
96
+ **How these differ from `hg38_celltype.clfx`** is structure, not just training
97
+ data. The tree *routes*: a query descends 11 nodes, each with its own booster
98
+ over its own class subset, so a wrong turn high up cannot be recovered lower
99
+ down. A bank has one node and no routing decision to get wrong, and covers 63
100
+ classes against the tree's 33.
101
+
102
+ The tree stays published β€” it is what earlier results were produced with, and
103
+ nothing citing it needs to move. For mouse that tree is `mm10_celltype_brain.clfx`;
104
+ `mm10_brain_full.clfx` and `mm10_brain_lite.clfx` are its bank counterparts.
105
+ All three mouse models are **brain only**: a non-brain cell is forced onto the
106
+ nearest brain type.
107
+
108
+ All of them run the same way:
109
+
110
+ ```sh
111
+ methscope classify hg38_celltype_lite.clfx query.cg
112
+ ```
113
+
114
  `methscope inspect <model>` prints the exact framework, full label list, and (for
115
  linear models) per-feature weights. Classifiers carry a required framework `kind`
116
  mark (`tree` / `violation` / `threshold` / `logistic`); `classify` rejects an
 
208
  class the query contradicts least, and there is nothing to fit:
209
 
210
  ```sh
211
+ methscope classify --framework violation ref.mrmp query.cg
212
  ```
213
 
214
  ```