Add 15 tuned XGBoost models (native .ubj), model card, feature code, manifests
Browse files- .gitattributes +15 -0
- MANIFEST.sha256 +18 -0
- README.md +66 -0
- manifest.json +293 -0
- weights/gm12878/seed0.ubj +3 -0
- weights/gm12878/seed1.ubj +3 -0
- weights/gm12878/seed2.ubj +3 -0
- weights/gm12878/seed3.ubj +3 -0
- weights/gm12878/seed4.ubj +3 -0
- weights/k562/seed0.ubj +3 -0
- weights/k562/seed1.ubj +3 -0
- weights/k562/seed2.ubj +3 -0
- weights/k562/seed3.ubj +3 -0
- weights/k562/seed4.ubj +3 -0
- weights/tcell/seed0.ubj +3 -0
- weights/tcell/seed1.ubj +3 -0
- weights/tcell/seed2.ubj +3 -0
- weights/tcell/seed3.ubj +3 -0
- weights/tcell/seed4.ubj +3 -0
- xgb_features.py +28 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,18 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
weights/gm12878/seed0.ubj filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
weights/gm12878/seed1.ubj filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
weights/gm12878/seed2.ubj filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
weights/gm12878/seed3.ubj filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
weights/gm12878/seed4.ubj filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
weights/k562/seed0.ubj filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
weights/k562/seed1.ubj filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
weights/k562/seed2.ubj filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
weights/k562/seed3.ubj filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
weights/k562/seed4.ubj filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
weights/tcell/seed0.ubj filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
weights/tcell/seed1.ubj filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
weights/tcell/seed2.ubj filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
weights/tcell/seed3.ubj filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
weights/tcell/seed4.ubj filter=lfs diff=lfs merge=lfs -text
|
MANIFEST.sha256
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
3ce1faeec8366c8072538de7a8c08d31aa91ed3b55d909ef6a06884c7a172eae ./README.md
|
| 2 |
+
d1a434de867b20cb28b60a946aa60d8347d79dd5dc7e59ac43fe40235a8e225c ./manifest.json
|
| 3 |
+
13f322cf067bedde8276b7aef8d4abfe144b58231dff9bf3b29675174d0a06b4 ./weights/gm12878/seed0.ubj
|
| 4 |
+
88ab0d42d350cde0b6bfa94946486e55868a7684b332e47e80b3596390d04560 ./weights/gm12878/seed1.ubj
|
| 5 |
+
9d363259df1c63a594e1b0cebac39acc75728c691c734aa87616dcd21670bb80 ./weights/gm12878/seed2.ubj
|
| 6 |
+
1041a5e92e94bfd6657c3e2a1ef4d93100c0c830bcfc2880c319ec53cb6a3f92 ./weights/gm12878/seed3.ubj
|
| 7 |
+
2b0c40701970b6408f2c63ad7b764cf6b8e121bce6a7f91f66749adeee8647f7 ./weights/gm12878/seed4.ubj
|
| 8 |
+
4a219400927f238c7f8413f40f66230ad0603c30e4fd4e23af7e53938894b835 ./weights/k562/seed0.ubj
|
| 9 |
+
7d96b8ccabd70e7b11e83b690fed0230e5e9936c3d6e2f62d024a27ec2b6e751 ./weights/k562/seed1.ubj
|
| 10 |
+
4437e20b2cf2c68faf4a73fde01133346d6444699d736a46f58e6cc1380d434b ./weights/k562/seed2.ubj
|
| 11 |
+
e64ac6274f305464e5a2062a721cc4f08d50c8bd91239c0eb428667b85e60489 ./weights/k562/seed3.ubj
|
| 12 |
+
a6982dc9b6b329360d09bb3116ed8ff58bc619f9d57d9d197c0e62f49e51dbac ./weights/k562/seed4.ubj
|
| 13 |
+
21a2fc2a0af208b0276e4d004cbf995700bf5a8677edb4877adec15d703ed745 ./weights/tcell/seed0.ubj
|
| 14 |
+
9f7228f6111499e024e8676dc5cb468e19bd44e3f136fcc09e468ba60c43dd4a ./weights/tcell/seed1.ubj
|
| 15 |
+
270958d5d2801f09d3cfbc5686accba0403d6b0c0a0697d1b34265876e462ec4 ./weights/tcell/seed2.ubj
|
| 16 |
+
81203dfd753cd408fa6aeb67bf83f73ba9ae54aab5c5703f0f74ad347c87b7f9 ./weights/tcell/seed3.ubj
|
| 17 |
+
ead8c8f51c5fd8fcf0fb820799499fedd9c695699ad18efd191a164524e32478 ./weights/tcell/seed4.ubj
|
| 18 |
+
5298bc0bb86e84441be634d21239b7715b73497b6e9999084e7f0b52d894b641 ./xgb_features.py
|
README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
library_name: xgboost
|
| 4 |
+
pipeline_tag: tabular-classification
|
| 5 |
+
tags: [genomics, regulatory-elements, ENCODE, xgboost, kmer, dna, baseline]
|
| 6 |
+
datasets: [PxALabs/encode-regulatory-elements]
|
| 7 |
+
---
|
| 8 |
+
# IRG XGBoost baselines (notebook 09)
|
| 9 |
+
|
| 10 |
+
Fifteen gradient-boosted classifiers (3 biosamples x 5 seeds) that predict whether a 1,000 bp window is an ENCODE candidate
|
| 11 |
+
cis-regulatory element (cCRE: PLS, pELS or dELS) of one biosample, against GC-matched genomic background, from **6-mer
|
| 12 |
+
frequencies** (4,096 features). Trained on `PxALabs/encode-regulatory-elements` v2.1, `*_gc_matched` tables. Part of
|
| 13 |
+
github.com/PxA-Labs/interpretable-regulatory-genomics. **No pretrained or language models are involved.** These are the tuned
|
| 14 |
+
reference baseline that CNNs and any later model must be compared against.
|
| 15 |
+
|
| 16 |
+
## Files
|
| 17 |
+
- `weights/<biosample>/seed<N>.ubj` - XGBoost native binary models (`tcell`, `k562`, `gm12878`; seeds 0-4); no pickle
|
| 18 |
+
- `xgb_features.py` - the feature function (6-mer frequencies; windows containing N are skipped)
|
| 19 |
+
- `manifest.json` - per file: SHA-256, size, selected hyperparameters, best iteration, validation and test AUROC; `MANIFEST.sha256`
|
| 20 |
+
|
| 21 |
+
## Usage
|
| 22 |
+
```python
|
| 23 |
+
import xgboost as xgb
|
| 24 |
+
from xgb_features import kmer_features
|
| 25 |
+
clf = xgb.XGBClassifier(); clf.load_model("weights/k562/seed0.ubj")
|
| 26 |
+
p = clf.predict_proba(kmer_features(["ACGT" * 250], k=6))[:, 1] # probability of being a K562 cCRE
|
| 27 |
+
```
|
| 28 |
+
Use all five seeds and report the spread; do not pick a seed on test data.
|
| 29 |
+
|
| 30 |
+
## Training
|
| 31 |
+
Random search over 24 configurations on the **validation** chromosomes only (seed 0, early stopping on validation AUC, up to
|
| 32 |
+
1,500 trees, patience 50). Search space: max_depth {4, 6, 8}, learning_rate {0.05, 0.1}, subsample {0.6, 0.8, 1.0},
|
| 33 |
+
colsample_bytree {0.3, 0.5, 0.8}, min_child_weight {1, 5, 10}, reg_lambda {1, 5, 20}; configuration 0 is the earlier default.
|
| 34 |
+
Selected: tcell (depth 6, lr 0.05, subsample 0.6, colsample 0.3, min_child_weight 10, lambda 1); k562 (depth 6, lr 0.05, subsample 1.0,
|
| 35 |
+
colsample 0.3, min_child_weight 5, lambda 20); gm12878 (depth 8, lr 0.05, subsample 1.0, colsample 0.3, min_child_weight 1, lambda 20).
|
| 36 |
+
Split: train chr1-14, X, Y / validation chr15-18 / test chr19-22. Test chromosomes were never used for selection.
|
| 37 |
+
Source: Kaggle kernel `purvanshj009/irg-09-xgb-tuned` v2, git `ff83f8f`, XGBoost on GPU.
|
| 38 |
+
|
| 39 |
+
## Evaluation (test chromosomes, mean over 5 seeds; SD in brackets)
|
| 40 |
+
"Matched" = test subset matched on GC and CpG observed/expected, equal positives and negatives per bin (a sub-population; not comparable with the full-task AUROC).
|
| 41 |
+
|
| 42 |
+
| biosample | test AUROC | matched AUROC | untuned default (same code) |
|
| 43 |
+
|:--|--:|--:|--:|
|
| 44 |
+
| tcell | 0.8894 (0.0003) | 0.7431 (0.0012) | 0.8845 / 0.7347 |
|
| 45 |
+
| k562 | 0.8695 (0.0004) | 0.7686 (0.0011) | 0.8636 / 0.7614 |
|
| 46 |
+
| gm12878 | 0.8429 (0.0008) | 0.7526 (0.0011) | 0.8350 / 0.7452 |
|
| 47 |
+
|
| 48 |
+
Against the tuned CNNs of `PxALabs/irg-cnn-baselines`, these models are level on T cell and K562 and slightly behind on GM12878
|
| 49 |
+
(ShallowCNN +0.004 full, +0.012 matched). Full analysis and caveats: `docs/results/xgb_tuned.md` in the GitHub repository.
|
| 50 |
+
|
| 51 |
+
## Intended use and limitations
|
| 52 |
+
- Reference baselines for sequence-based cCRE classification. Not for clinical use or variant-effect prediction.
|
| 53 |
+
- Each model is specific to the biosample it was trained on; cross-biosample use is not covered here.
|
| 54 |
+
- The negatives are GC-matched genomic windows outside the biosample's cCREs, not validated non-regulatory elements.
|
| 55 |
+
- **The search was truncated.** The selected configurations sit on the edge of the search space (lowest learning rate and colsample tried;
|
| 56 |
+
highest lambda in two biosamples), and the best iteration was 1,369-1,499 of the 1,500-tree cap, so these models are probably still
|
| 57 |
+
slightly under-tuned.
|
| 58 |
+
- Only k=6 was tuned. The 24-configuration search used one seed, and validation differences between configurations were small (about 0.005-0.007).
|
| 59 |
+
- Composition shortcuts (GC, CpG) are controlled only in the matched evaluation; repeat content is not controlled in training.
|
| 60 |
+
- The untuned-default comparison models were not saved.
|
| 61 |
+
- Data note: the project's earlier tables named `k562_*` were T-cell elements; these models use the corrected v2.1 tables.
|
| 62 |
+
|
| 63 |
+
## Provenance and integrity
|
| 64 |
+
Every file was reloaded and its best iteration checked against the run log. Seed-0 models for each biosample and seed 3 for GM12878
|
| 65 |
+
were re-scored on the real test rows and reproduced the AUROC recorded during the run to four decimals (0.8895, 0.8698, 0.8419, 0.8436).
|
| 66 |
+
The other 11 were checked for loading and best iteration only.
|
manifest.json
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source_kernel": "purvanshj009/irg-09-xgb-tuned",
|
| 3 |
+
"kernel_version": "2",
|
| 4 |
+
"git_sha": "ff83f8f",
|
| 5 |
+
"features": "6-mer frequencies, 4096 columns, tools/hf/xgb_features.py",
|
| 6 |
+
"models": [
|
| 7 |
+
{
|
| 8 |
+
"file": "weights/gm12878/seed0.ubj",
|
| 9 |
+
"sha256": "13f322cf067bedde8276b7aef8d4abfe144b58231dff9bf3b29675174d0a06b4",
|
| 10 |
+
"biosample": "gm12878",
|
| 11 |
+
"seed": 0,
|
| 12 |
+
"bytes": 16726754,
|
| 13 |
+
"best_iteration": 1499,
|
| 14 |
+
"auroc_val": 0.8483,
|
| 15 |
+
"auroc_test": 0.8419,
|
| 16 |
+
"auroc_gc_cpg_matched": 0.751,
|
| 17 |
+
"params": {
|
| 18 |
+
"max_depth": 8,
|
| 19 |
+
"learning_rate": 0.05,
|
| 20 |
+
"subsample": 1.0,
|
| 21 |
+
"colsample_bytree": 0.3,
|
| 22 |
+
"min_child_weight": 1,
|
| 23 |
+
"reg_lambda": 20.0
|
| 24 |
+
}
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"file": "weights/gm12878/seed1.ubj",
|
| 28 |
+
"sha256": "88ab0d42d350cde0b6bfa94946486e55868a7684b332e47e80b3596390d04560",
|
| 29 |
+
"biosample": "gm12878",
|
| 30 |
+
"seed": 1,
|
| 31 |
+
"bytes": 16792852,
|
| 32 |
+
"best_iteration": 1482,
|
| 33 |
+
"auroc_val": 0.8485,
|
| 34 |
+
"auroc_test": 0.8424,
|
| 35 |
+
"auroc_gc_cpg_matched": 0.7523,
|
| 36 |
+
"params": {
|
| 37 |
+
"max_depth": 8,
|
| 38 |
+
"learning_rate": 0.05,
|
| 39 |
+
"subsample": 1.0,
|
| 40 |
+
"colsample_bytree": 0.3,
|
| 41 |
+
"min_child_weight": 1,
|
| 42 |
+
"reg_lambda": 20.0
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"file": "weights/gm12878/seed2.ubj",
|
| 47 |
+
"sha256": "9d363259df1c63a594e1b0cebac39acc75728c691c734aa87616dcd21670bb80",
|
| 48 |
+
"biosample": "gm12878",
|
| 49 |
+
"seed": 2,
|
| 50 |
+
"bytes": 15666515,
|
| 51 |
+
"best_iteration": 1354,
|
| 52 |
+
"auroc_val": 0.848,
|
| 53 |
+
"auroc_test": 0.8432,
|
| 54 |
+
"auroc_gc_cpg_matched": 0.7526,
|
| 55 |
+
"params": {
|
| 56 |
+
"max_depth": 8,
|
| 57 |
+
"learning_rate": 0.05,
|
| 58 |
+
"subsample": 1.0,
|
| 59 |
+
"colsample_bytree": 0.3,
|
| 60 |
+
"min_child_weight": 1,
|
| 61 |
+
"reg_lambda": 20.0
|
| 62 |
+
}
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"file": "weights/gm12878/seed3.ubj",
|
| 66 |
+
"sha256": "1041a5e92e94bfd6657c3e2a1ef4d93100c0c830bcfc2880c319ec53cb6a3f92",
|
| 67 |
+
"biosample": "gm12878",
|
| 68 |
+
"seed": 3,
|
| 69 |
+
"bytes": 16765989,
|
| 70 |
+
"best_iteration": 1498,
|
| 71 |
+
"auroc_val": 0.8489,
|
| 72 |
+
"auroc_test": 0.8436,
|
| 73 |
+
"auroc_gc_cpg_matched": 0.7533,
|
| 74 |
+
"params": {
|
| 75 |
+
"max_depth": 8,
|
| 76 |
+
"learning_rate": 0.05,
|
| 77 |
+
"subsample": 1.0,
|
| 78 |
+
"colsample_bytree": 0.3,
|
| 79 |
+
"min_child_weight": 1,
|
| 80 |
+
"reg_lambda": 20.0
|
| 81 |
+
}
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"file": "weights/gm12878/seed4.ubj",
|
| 85 |
+
"sha256": "2b0c40701970b6408f2c63ad7b764cf6b8e121bce6a7f91f66749adeee8647f7",
|
| 86 |
+
"biosample": "gm12878",
|
| 87 |
+
"seed": 4,
|
| 88 |
+
"bytes": 16802440,
|
| 89 |
+
"best_iteration": 1496,
|
| 90 |
+
"auroc_val": 0.8489,
|
| 91 |
+
"auroc_test": 0.8436,
|
| 92 |
+
"auroc_gc_cpg_matched": 0.7537,
|
| 93 |
+
"params": {
|
| 94 |
+
"max_depth": 8,
|
| 95 |
+
"learning_rate": 0.05,
|
| 96 |
+
"subsample": 1.0,
|
| 97 |
+
"colsample_bytree": 0.3,
|
| 98 |
+
"min_child_weight": 1,
|
| 99 |
+
"reg_lambda": 20.0
|
| 100 |
+
}
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"file": "weights/k562/seed0.ubj",
|
| 104 |
+
"sha256": "4a219400927f238c7f8413f40f66230ad0603c30e4fd4e23af7e53938894b835",
|
| 105 |
+
"biosample": "k562",
|
| 106 |
+
"seed": 0,
|
| 107 |
+
"bytes": 5315689,
|
| 108 |
+
"best_iteration": 1493,
|
| 109 |
+
"auroc_val": 0.8775,
|
| 110 |
+
"auroc_test": 0.8698,
|
| 111 |
+
"auroc_gc_cpg_matched": 0.7698,
|
| 112 |
+
"params": {
|
| 113 |
+
"max_depth": 6,
|
| 114 |
+
"learning_rate": 0.05,
|
| 115 |
+
"subsample": 1.0,
|
| 116 |
+
"colsample_bytree": 0.3,
|
| 117 |
+
"min_child_weight": 5,
|
| 118 |
+
"reg_lambda": 20.0
|
| 119 |
+
}
|
| 120 |
+
},
|
| 121 |
+
{
|
| 122 |
+
"file": "weights/k562/seed1.ubj",
|
| 123 |
+
"sha256": "7d96b8ccabd70e7b11e83b690fed0230e5e9936c3d6e2f62d024a27ec2b6e751",
|
| 124 |
+
"biosample": "k562",
|
| 125 |
+
"seed": 1,
|
| 126 |
+
"bytes": 5310506,
|
| 127 |
+
"best_iteration": 1492,
|
| 128 |
+
"auroc_val": 0.8771,
|
| 129 |
+
"auroc_test": 0.8697,
|
| 130 |
+
"auroc_gc_cpg_matched": 0.7683,
|
| 131 |
+
"params": {
|
| 132 |
+
"max_depth": 6,
|
| 133 |
+
"learning_rate": 0.05,
|
| 134 |
+
"subsample": 1.0,
|
| 135 |
+
"colsample_bytree": 0.3,
|
| 136 |
+
"min_child_weight": 5,
|
| 137 |
+
"reg_lambda": 20.0
|
| 138 |
+
}
|
| 139 |
+
},
|
| 140 |
+
{
|
| 141 |
+
"file": "weights/k562/seed2.ubj",
|
| 142 |
+
"sha256": "4437e20b2cf2c68faf4a73fde01133346d6444699d736a46f58e6cc1380d434b",
|
| 143 |
+
"biosample": "k562",
|
| 144 |
+
"seed": 2,
|
| 145 |
+
"bytes": 5299434,
|
| 146 |
+
"best_iteration": 1493,
|
| 147 |
+
"auroc_val": 0.8772,
|
| 148 |
+
"auroc_test": 0.8694,
|
| 149 |
+
"auroc_gc_cpg_matched": 0.7687,
|
| 150 |
+
"params": {
|
| 151 |
+
"max_depth": 6,
|
| 152 |
+
"learning_rate": 0.05,
|
| 153 |
+
"subsample": 1.0,
|
| 154 |
+
"colsample_bytree": 0.3,
|
| 155 |
+
"min_child_weight": 5,
|
| 156 |
+
"reg_lambda": 20.0
|
| 157 |
+
}
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"file": "weights/k562/seed3.ubj",
|
| 161 |
+
"sha256": "e64ac6274f305464e5a2062a721cc4f08d50c8bd91239c0eb428667b85e60489",
|
| 162 |
+
"biosample": "k562",
|
| 163 |
+
"seed": 3,
|
| 164 |
+
"bytes": 5293102,
|
| 165 |
+
"best_iteration": 1498,
|
| 166 |
+
"auroc_val": 0.8762,
|
| 167 |
+
"auroc_test": 0.8699,
|
| 168 |
+
"auroc_gc_cpg_matched": 0.7691,
|
| 169 |
+
"params": {
|
| 170 |
+
"max_depth": 6,
|
| 171 |
+
"learning_rate": 0.05,
|
| 172 |
+
"subsample": 1.0,
|
| 173 |
+
"colsample_bytree": 0.3,
|
| 174 |
+
"min_child_weight": 5,
|
| 175 |
+
"reg_lambda": 20.0
|
| 176 |
+
}
|
| 177 |
+
},
|
| 178 |
+
{
|
| 179 |
+
"file": "weights/k562/seed4.ubj",
|
| 180 |
+
"sha256": "a6982dc9b6b329360d09bb3116ed8ff58bc619f9d57d9d197c0e62f49e51dbac",
|
| 181 |
+
"biosample": "k562",
|
| 182 |
+
"seed": 4,
|
| 183 |
+
"bytes": 5295410,
|
| 184 |
+
"best_iteration": 1452,
|
| 185 |
+
"auroc_val": 0.878,
|
| 186 |
+
"auroc_test": 0.8689,
|
| 187 |
+
"auroc_gc_cpg_matched": 0.7669,
|
| 188 |
+
"params": {
|
| 189 |
+
"max_depth": 6,
|
| 190 |
+
"learning_rate": 0.05,
|
| 191 |
+
"subsample": 1.0,
|
| 192 |
+
"colsample_bytree": 0.3,
|
| 193 |
+
"min_child_weight": 5,
|
| 194 |
+
"reg_lambda": 20.0
|
| 195 |
+
}
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"file": "weights/tcell/seed0.ubj",
|
| 199 |
+
"sha256": "21a2fc2a0af208b0276e4d004cbf995700bf5a8677edb4877adec15d703ed745",
|
| 200 |
+
"biosample": "tcell",
|
| 201 |
+
"seed": 0,
|
| 202 |
+
"bytes": 4198815,
|
| 203 |
+
"best_iteration": 1482,
|
| 204 |
+
"auroc_val": 0.8981,
|
| 205 |
+
"auroc_test": 0.8895,
|
| 206 |
+
"auroc_gc_cpg_matched": 0.7438,
|
| 207 |
+
"params": {
|
| 208 |
+
"max_depth": 6,
|
| 209 |
+
"learning_rate": 0.05,
|
| 210 |
+
"subsample": 0.6,
|
| 211 |
+
"colsample_bytree": 0.3,
|
| 212 |
+
"min_child_weight": 10,
|
| 213 |
+
"reg_lambda": 1.0
|
| 214 |
+
}
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"file": "weights/tcell/seed1.ubj",
|
| 218 |
+
"sha256": "9f7228f6111499e024e8676dc5cb468e19bd44e3f136fcc09e468ba60c43dd4a",
|
| 219 |
+
"biosample": "tcell",
|
| 220 |
+
"seed": 1,
|
| 221 |
+
"bytes": 4188348,
|
| 222 |
+
"best_iteration": 1464,
|
| 223 |
+
"auroc_val": 0.8974,
|
| 224 |
+
"auroc_test": 0.8892,
|
| 225 |
+
"auroc_gc_cpg_matched": 0.742,
|
| 226 |
+
"params": {
|
| 227 |
+
"max_depth": 6,
|
| 228 |
+
"learning_rate": 0.05,
|
| 229 |
+
"subsample": 0.6,
|
| 230 |
+
"colsample_bytree": 0.3,
|
| 231 |
+
"min_child_weight": 10,
|
| 232 |
+
"reg_lambda": 1.0
|
| 233 |
+
}
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"file": "weights/tcell/seed2.ubj",
|
| 237 |
+
"sha256": "270958d5d2801f09d3cfbc5686accba0403d6b0c0a0697d1b34265876e462ec4",
|
| 238 |
+
"biosample": "tcell",
|
| 239 |
+
"seed": 2,
|
| 240 |
+
"bytes": 3561878,
|
| 241 |
+
"best_iteration": 1191,
|
| 242 |
+
"auroc_val": 0.8962,
|
| 243 |
+
"auroc_test": 0.8895,
|
| 244 |
+
"auroc_gc_cpg_matched": 0.7419,
|
| 245 |
+
"params": {
|
| 246 |
+
"max_depth": 6,
|
| 247 |
+
"learning_rate": 0.05,
|
| 248 |
+
"subsample": 0.6,
|
| 249 |
+
"colsample_bytree": 0.3,
|
| 250 |
+
"min_child_weight": 10,
|
| 251 |
+
"reg_lambda": 1.0
|
| 252 |
+
}
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"file": "weights/tcell/seed3.ubj",
|
| 256 |
+
"sha256": "81203dfd753cd408fa6aeb67bf83f73ba9ae54aab5c5703f0f74ad347c87b7f9",
|
| 257 |
+
"biosample": "tcell",
|
| 258 |
+
"seed": 3,
|
| 259 |
+
"bytes": 4084693,
|
| 260 |
+
"best_iteration": 1401,
|
| 261 |
+
"auroc_val": 0.8967,
|
| 262 |
+
"auroc_test": 0.8892,
|
| 263 |
+
"auroc_gc_cpg_matched": 0.7427,
|
| 264 |
+
"params": {
|
| 265 |
+
"max_depth": 6,
|
| 266 |
+
"learning_rate": 0.05,
|
| 267 |
+
"subsample": 0.6,
|
| 268 |
+
"colsample_bytree": 0.3,
|
| 269 |
+
"min_child_weight": 10,
|
| 270 |
+
"reg_lambda": 1.0
|
| 271 |
+
}
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"file": "weights/tcell/seed4.ubj",
|
| 275 |
+
"sha256": "ead8c8f51c5fd8fcf0fb820799499fedd9c695699ad18efd191a164524e32478",
|
| 276 |
+
"biosample": "tcell",
|
| 277 |
+
"seed": 4,
|
| 278 |
+
"bytes": 3846613,
|
| 279 |
+
"best_iteration": 1307,
|
| 280 |
+
"auroc_val": 0.8955,
|
| 281 |
+
"auroc_test": 0.8898,
|
| 282 |
+
"auroc_gc_cpg_matched": 0.7448,
|
| 283 |
+
"params": {
|
| 284 |
+
"max_depth": 6,
|
| 285 |
+
"learning_rate": 0.05,
|
| 286 |
+
"subsample": 0.6,
|
| 287 |
+
"colsample_bytree": 0.3,
|
| 288 |
+
"min_child_weight": 10,
|
| 289 |
+
"reg_lambda": 1.0
|
| 290 |
+
}
|
| 291 |
+
}
|
| 292 |
+
]
|
| 293 |
+
}
|
weights/gm12878/seed0.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:13f322cf067bedde8276b7aef8d4abfe144b58231dff9bf3b29675174d0a06b4
|
| 3 |
+
size 16726754
|
weights/gm12878/seed1.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:88ab0d42d350cde0b6bfa94946486e55868a7684b332e47e80b3596390d04560
|
| 3 |
+
size 16792852
|
weights/gm12878/seed2.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9d363259df1c63a594e1b0cebac39acc75728c691c734aa87616dcd21670bb80
|
| 3 |
+
size 15666515
|
weights/gm12878/seed3.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1041a5e92e94bfd6657c3e2a1ef4d93100c0c830bcfc2880c319ec53cb6a3f92
|
| 3 |
+
size 16765989
|
weights/gm12878/seed4.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2b0c40701970b6408f2c63ad7b764cf6b8e121bce6a7f91f66749adeee8647f7
|
| 3 |
+
size 16802440
|
weights/k562/seed0.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4a219400927f238c7f8413f40f66230ad0603c30e4fd4e23af7e53938894b835
|
| 3 |
+
size 5315689
|
weights/k562/seed1.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d96b8ccabd70e7b11e83b690fed0230e5e9936c3d6e2f62d024a27ec2b6e751
|
| 3 |
+
size 5310506
|
weights/k562/seed2.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4437e20b2cf2c68faf4a73fde01133346d6444699d736a46f58e6cc1380d434b
|
| 3 |
+
size 5299434
|
weights/k562/seed3.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e64ac6274f305464e5a2062a721cc4f08d50c8bd91239c0eb428667b85e60489
|
| 3 |
+
size 5293102
|
weights/k562/seed4.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a6982dc9b6b329360d09bb3116ed8ff58bc619f9d57d9d197c0e62f49e51dbac
|
| 3 |
+
size 5295410
|
weights/tcell/seed0.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21a2fc2a0af208b0276e4d004cbf995700bf5a8677edb4877adec15d703ed745
|
| 3 |
+
size 4198815
|
weights/tcell/seed1.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9f7228f6111499e024e8676dc5cb468e19bd44e3f136fcc09e468ba60c43dd4a
|
| 3 |
+
size 4188348
|
weights/tcell/seed2.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:270958d5d2801f09d3cfbc5686accba0403d6b0c0a0697d1b34265876e462ec4
|
| 3 |
+
size 3561878
|
weights/tcell/seed3.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:81203dfd753cd408fa6aeb67bf83f73ba9ae54aab5c5703f0f74ad347c87b7f9
|
| 3 |
+
size 4084693
|
weights/tcell/seed4.ubj
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ead8c8f51c5fd8fcf0fb820799499fedd9c695699ad18efd191a164524e32478
|
| 3 |
+
size 3846613
|
xgb_features.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""k-mer frequency features used by the IRG XGBoost baselines (identical to kaggle/kernels/09-xgb-tuned).
|
| 2 |
+
|
| 3 |
+
from xgb_features import kmer_features
|
| 4 |
+
X = kmer_features(["ACGT" * 250], k=6) # (n, 4096) float32, each row sums to 1 (windows containing N are skipped)
|
| 5 |
+
"""
|
| 6 |
+
from __future__ import annotations
|
| 7 |
+
|
| 8 |
+
import numpy as np
|
| 9 |
+
|
| 10 |
+
_LUT = np.full(256, -1, dtype=np.int64)
|
| 11 |
+
for _i, _c in enumerate("ACGT"):
|
| 12 |
+
_LUT[ord(_c)] = _i
|
| 13 |
+
_LUT[ord(_c.lower())] = _i
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def kmer_features(seqs: list[str], k: int = 6) -> np.ndarray:
|
| 17 |
+
X = np.zeros((len(seqs), 4**k), dtype=np.float32)
|
| 18 |
+
for r, s in enumerate(seqs):
|
| 19 |
+
a = _LUT[np.frombuffer(s.encode(), dtype=np.uint8)]
|
| 20 |
+
n = len(a) - k + 1
|
| 21 |
+
idx, ok = np.zeros(n, dtype=np.int64), np.ones(n, dtype=bool)
|
| 22 |
+
for j in range(k):
|
| 23 |
+
seg = a[j : j + n]
|
| 24 |
+
ok &= seg >= 0
|
| 25 |
+
idx = idx * 4 + np.where(seg >= 0, seg, 0)
|
| 26 |
+
c = np.bincount(idx[ok], minlength=4**k).astype(np.float32)
|
| 27 |
+
X[r] = c / max(c.sum(), 1.0)
|
| 28 |
+
return X
|