Beyond MAE: Phase 1 Baselines
This repository contains the three mandatory Phase 1 baselines from the pipeline described in "Beyond Mean Absolute Error: Ancestry-Stratified Calibration and Explainability for Warfarin Dosing Models", a nine-phase reproducible ML pipeline for warfarin dose prediction on the public IWPC pharmacogenomic cohorts. These set the performance floor every later-phase model in the project is compared against; no model is reported as an improvement unless it beats the IWPC published equation below (MAE 9.177).
By: Hassan Barmandah, Omar Abdullah Bawazir, Siraj Aldeen Marghalani, Moath Shaat, Abdullah N. Alkattan, and Mariam M. AlEissa (corresponding author), Alfaisal University, Riyadh (with Umm Al-Qura University, Saudi Electronic University, Ministry of Health, Public Health Authority, King Khaled Eye Specialist Hospital Research Center, King Abdullah Petroleum Studies and Research Center)
This is a research artifact, not a validated clinical tool. It has not been evaluated prospectively and has no regulatory status.
Model Description
Three baselines, evaluated on IWPC-6256 (n=6,037 after cleaning, n_test=1,207, fixed 80/20 patient-level split, seed 20260725):
- Naive median-dose predictor: always outputs the training-fold median dose. The performance floor.
- Clinical-only linear regression: ordinary least squares on clinical features only (age, weight, height, indication, comorbidity and comedication flags), no genetic information.
- IWPC published pharmacogenetic equation: a hand-implemented version of the published square-root-of-dose formula (IWPC, N Engl J Med 2009;360:753-64), the only one of the three that uses genotype (CYP2C9/VKORC1).
Key Contributions
- Performance Floor: every model in this project's Phase 3 ablation is reported against these three baselines, not in isolation
- Genetics-Aware Reference: the IWPC equation baseline is the only one of the three that incorporates genotype, and beats the clinical-only baseline by the margin genetics would predict
- Provenance Discipline: the equation's coefficients are flagged as transcribed from the widely-cited public form (the same form implemented by public calculators such as warfarindosing.org), not verified directly against the original paper's Table 2; stated plainly rather than silently assumed correct
π How to Use
import joblib # this repo's own artifact format (fit via common/hf_push.py);
# only load .joblib files from this specific, trusted repo
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(
repo_id="HassanB4/warfarisk-baselines",
filename="clinical_only_linear_regression.joblib", # see repo files for exact names
)
model = joblib.load(model_path)
prediction = model.predict(your_clinical_features_dataframe)
The IWPC published-equation baseline is a plain Python function (iwpc_published_equation_predict()), not a fitted sklearn estimator; see HasanBGit/WarfaRisk's src/warfarisk/phase1_baselines.py for its implementation.
βοΈ Training Procedure
Training Data
| Split | Samples | Description |
|---|---|---|
| Training | 4,830 | 80% of IWPC-6256, patient-ID-level split |
| Test | 1,207 | Held out, seed 20260725 |
Hyperparameters
| Parameter | Value | Parameter | Value |
|---|---|---|---|
| Cohort | IWPC-6256 | Split Level | Patient ID (not row) |
| Split Seed | 20260725 | Test Fraction | 0.20 |
| Leakage Audit | 11/11 checks passed | Preprocessing Fit | Training fold only |
π Evaluation Results
| Baseline | MAE (mg/week) | RΒ² | PW20 |
|---|---|---|---|
| Naive median dose | 12.339 | -0.048 | 0.342 |
| Clinical-only linear regression | 10.860 | 0.222 | 0.354 |
| IWPC published pharmacogenetic equation | 9.177 | 0.413 | 0.429 |
PW20 = proportion of predictions within 20% of the true dose (IWPC's own clinical-acceptability threshold is β₯0.50: none of these three baselines clear it; see HassanB4/warfarisk-autogluon-6256 for a model that gets closer).
β οΈ Limitations
- Research-Only: not validated prospectively, no regulatory status
- Equation Provenance: the IWPC-equation baseline's coefficients were transcribed from the widely-cited public form, not independently verified against the original paper's Table 2
- Single Cohort: evaluated on IWPC-6256 only; see
HassanB4/warfarisk-autogluon-1780for the second cohort - Fragmented Ancestry Labels: IWPC-6256's Black/African-American patients are split across three overlapping labels, which affects subgroup-level interpretation of any model trained on this cohort (addressed in this project's Phase 4/5 fairness and calibration analyses)
π Acknowledgements
We thank the PharmGKB / International Warfarin Pharmacogenetics Consortium for the IWPC dataset.
Related Links
π Citation
This model is described in the following manuscript, submitted to the MDPI journal AI and under review as of August 2026. The DOI below will be updated once the paper is formally published.
Barmandah, H.; Bawazir, O.A.; Marghalani, S.A.; Shaat, M.; Alkattan, A.N.; AlEissa, M.M. Beyond Mean Absolute Error: Ancestry-Stratified Calibration and Explainability for Warfarin Dosing Models. AI 2026, submitted.
@article{barmandah2026beyond,
title={Beyond Mean Absolute Error: Ancestry-Stratified Calibration and Explainability for Warfarin Dosing Models},
author={Barmandah, Hassan and Bawazir, Omar Abdullah and Marghalani, Siraj Aldeen and Shaat, Moath and Alkattan, Abdullah N. and AlEissa, Mariam M.},
journal={AI},
publisher={MDPI},
year={2026},
note={Manuscript submitted, under review as of August 2026. Cite the published DOI once assigned.}
}
π License
This project is licensed under the Apache 2.0 License. This model was fit on IWPC data; the fitted artifact and code are shared under Apache-2.0, but the underlying IWPC dataset is not redistributed by this repository; see HasanBGit/WarfaRisk's data/DATA.md for how to obtain it.
Collection including HassanB4/warfarisk-baselines
Evaluation results
- MAE (IWPC published equation) on IWPC-6256 (International Warfarin Pharmacogenetics Consortium)self-reported9.177
- R2 (IWPC published equation) on IWPC-6256 (International Warfarin Pharmacogenetics Consortium)self-reported0.413