Instructions to use Delower/liver-extratrees-deployment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use Delower/liver-extratrees-deployment with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("Delower/liver-extratrees-deployment", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Delower/liver-extratrees-deployment: direct link, hf CLI and curl.
- Browser
- Download file 4.03 kB
-
https://huggingface.co/Delower/liver-extratrees-deployment/resolve/main/README.md
- Command line
-
hf download hf://Delower/liver-extratrees-deployment/README.md
-
curl -L -o README.md https://huggingface.co/Delower/liver-extratrees-deployment/resolve/main/README.md
4.03 kB
| license: mit | |
| tags: | |
| - toxicity | |
| - dili | |
| - liver-toxicity | |
| - qsar | |
| - sklearn | |
| - deployment-refit | |
| # Liver toxicity (DILI) β ExtraTrees deployment model | |
| Binary classifier for drug-induced liver injury (DILI) concern: the | |
| probability that a compound belongs to the toxic class. This is the | |
| **deployment refit** of the liver programme's Arch3 LazyPredict-best | |
| model (ExtraTrees), one of the two winners selected on the locked | |
| regulatory benchmark. It is deployed as a pair with the GAT | |
| deployment model (`Delower/liver-gat-deployment`); a compound | |
| flagged by **both** models is the highest-concern readout. | |
| ## Recipe | |
| - Model: `ExtraTreesClassifier` with scikit-learn defaults and | |
| `random_state=42` β the arm's own recipe, reused unchanged with | |
| **no re-tuning**. | |
| - Features (`fp_desc`, 1,404 columns): Morgan fingerprint bits | |
| (1024) + MACCS keys (167) + RDKit descriptors prepared by the | |
| arm's `DescPrep` (fit on the full deployment set; shipped inside | |
| the weights bundle). | |
| - Flag threshold: probability β₯ 0.5 (the arm's own convention). | |
| ## Deployment training set | |
| All labeled liver data the programme holds, identity-deduped by | |
| InChIKey connectivity of the standardized parent: **1,891 unique | |
| compounds** (1,003 positive / 888 negative), composed of | |
| train_locked.csv (1,769 rows) + train_enriched.csv additions + | |
| internal_test.csv + **every regulatory benchmark compound** | |
| (withdrawn, clinical failures, PASS), with benchmark labels governing | |
| conflicts. 1,769 duplicate rows dropped; 42 label conflicts (all | |
| inside train_locked, the groups the earlier merge had excluded) kept | |
| at the first train_locked row's label and logged. | |
| **Hard gate (passed before training):** every deduped regulatory | |
| benchmark compound was verified compound-by-compound (InChIKey | |
| connectivity) inside the actual training matrix, | |
| post-featurization: withdrawn **71/71**, clinical failures **10/10**, | |
| PASS **304/304**. See `gate_verification.json`. | |
| ## Honest benchmark scores β benchmark version only | |
| The deployment refit absorbed the regulatory benchmark and is | |
| **never scored on it**. The frozen claim for this recipe comes from | |
| the locked-wave benchmark model (benchmark locked out of training, | |
| overlap verified 0; 385 scored compounds): | |
| | Metric | Value | | |
| |---|---| | |
| | Pooled regulatory AUROC | 0.690 | | |
| | Pooled balanced accuracy | 0.623 | | |
| | Withdrawn drugs caught | 65/71 | | |
| | Clinical failures caught | 10/10 | | |
| | PASS compounds correct | 97/304 (0.319) | | |
| ## Deployment screen results | |
| Applied to the DPP-4 programme's potent leads (flag = prob β₯ 0.5): | |
| 1,113/1,113 workbook leads scored, 1,082 flagged (97.5%); | |
| 4,898/4,898 of the full potent union scored, 4,722 flagged (96.5%). | |
| These flag rates are high β every model in this programme is a | |
| high-sensitivity, low-specificity screen, and the pair's | |
| discriminative readout is the dual flag (1,003/1,110 leads flagged | |
| by both models; only 6 pass both). Treat single-model flags as | |
| low-information on their own. | |
| ## Files | |
| - `model.joblib` β joblib bundle: the fitted `ExtraTreesClassifier`, | |
| the fitted `DescPrep` preprocessing object, and the feature-block | |
| kind. Unpickling requires `deployment_common.py` (shipped here) to | |
| be importable. | |
| - `config.json` β recipe, training composition, gate counts, | |
| benchmark scores. | |
| - `deployment_common.py` β the programme's shared featurization | |
| module (fingerprints, descriptors, `DescPrep`). | |
| - `infer.py` β prediction entry point (`predict(smiles)`). | |
| - `validate.py` + `examples.json` β runnable validation: reproduces | |
| this model's probabilities on 8 screened DPP-4 leads (tolerance | |
| 1e-6; the model is deterministic). Verified locally before upload: | |
| max deviation 0. | |
| - `gate_verification.json`, `training_manifest.json` β hard-gate | |
| result and full training manifest. | |
| - `absorbed_compounds.csv` β the 1,891-compound deployment training | |
| set (the absorbed data, for audit). | |
| ## Limitations | |
| Requires `scikit-learn`, `rdkit`, `joblib`, `numpy`. Probabilities | |
| are screening scores, not calibrated clinical risks. | |