Background
Warfarin dosing in cardiac surgery patients is complicated by a heightened sensitivity to the drug, predisposing patients to adverse events. Predictive algorithms are therefore needed to guide warfarin dosing in cardiac surgery patients.
Objective
This study aimed to develop and validate an algorithm for predicting the warfarin dose needed to attain a therapeutic international normalized ratio (INR) at the time of discharge in cardiac surgery patients.
Methods
We abstracted variables influencing warfarin dosage from the records of 1031 encounters initiating warfarin between April 1, 2011, and November 29, 2019, at St Michael’s Hospital in Toronto, Ontario, Canada. We compared the performance of penalized linear regression, k-nearest neighbors, random forest regression, gradient boosting, multivariate adaptive regression splines, and an ensemble model combining the predictions of the 5 regression models. We developed and validated separate models for predicting the warfarin dose required for achieving a discharge INR of 2.0-3.0 in patients undergoing all forms of cardiac surgery except mechanical mitral valve replacement and a discharge INR of 2.5-3.5 in patients receiving a mechanical mitral valve replacement. For the former, we selected 80% of encounters (n=780) who had initiated warfarin during their hospital admission and had achieved a target INR of 2.0-3.0 at the time of discharge as the training cohort. Following 10-fold cross-validation, model accuracy was evaluated in a test cohort comprised solely of cardiac surgery patients. For patients requiring a target INR of 2.5-3.5 (n=165), we used leave-p-out cross-validation (p=3 observations) to estimate model performance. For each approach, we determined the mean absolute error (MAE) and the proportion of predictions within 20% of the true warfarin dose. We retrospectively evaluated the best-performing algorithm in clinical practice by comparing the proportion of cardiovascular surgery patients discharged with a therapeutic INR before (April 2011 and July 2019) and following (September 2021 and May 2, 2022) its implementation in routine care.
Results
Random forest regression was the best-performing model for patients with a target INR of 2.0-3.0, an MAE of 1.13 mg, and 39.5% of predictions of falling within 20% of the actual therapeutic discharge dose. For patients with a target INR of 2.5-3.5, the ensemble model performed best, with an MAE of 1.11 mg and 43.6% of predictions being within 20% of the actual therapeutic discharge dose. The proportion of cardiovascular surgery patients discharged with a therapeutic INR before and following implementation of these algorithms in clinical practice was 47.5% (305/641) and 61.1% (11/18), respectively.
Conclusions
Machine learning algorithms based on routinely available clinical data can help guide initial warfarin dosing in cardiac surgery patients and optimize the postsurgical anticoagulation of these patients.