WarfaRisk β€” Phase 1 Baselines

WarfaRisk Phase 1 Baselines

This repository contains the three mandatory Phase 1 baselines from WarfaRisk, 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, and Mariam M. AlEissa (corresponding author) β€” AI Center (AIC), Alfaisal University, Riyadh (with Umm Al-Qura University, Saudi Electronic University)

Code HuggingFace License

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):

  1. Naive median-dose predictor β€” always outputs the training-fold median dose. The performance floor.
  2. Clinical-only linear regression β€” ordinary least squares on clinical features only (age, weight, height, indication, comorbidity and comedication flags) β€” no genetic information.
  3. 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/warfarin-review-phase1-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/warfarin-review-phase3-autogluon-iwpc6256 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/warfarin-review-phase3-autogluon-iwpc1780 for 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

A paper describing this work is in preparation.

@misc{warfarisk,
    title={WarfaRisk: A Reproducible, Ancestry-Stratified Machine Learning Pipeline for Warfarin Dose Prediction},
    author={Barmandah, Hassan and Bawazir, Omar Abdullah and Marghalani, Siraj Aldeen and Shaat, Moath and AlEissa, Mariam M.},
    year={2026},
    note={Manuscript in preparation}
}

πŸ“„ 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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including HassanB4/warfarin-review-phase1-baselines

Evaluation results

  • MAE (IWPC published equation) on IWPC-6256 (International Warfarin Pharmacogenetics Consortium)
    self-reported
    9.177
  • R2 (IWPC published equation) on IWPC-6256 (International Warfarin Pharmacogenetics Consortium)
    self-reported
    0.413