Skip to main content
  • More from ADA
    • Diabetes
    • Clinical Diabetes
    • Diabetes Spectrum
    • ADA Standards of Medical Care
    • ADA Scientific Sessions Abstracts
    • BMJ Open Diabetes Research & Care
  • Subscribe
  • Log in
  • My Cart
  • Follow ada on Twitter
  • RSS
  • Visit ada on Facebook
Diabetes Care

Advanced Search

Main menu

  • Home
  • Current
    • Current Issue
    • Online Ahead of Print
    • Special Article Collections
    • ADA Standards of Medical Care
  • Browse
    • By Topic
    • Issue Archive
    • Saved Searches
    • Special Article Collections
    • ADA Standards of Medical Care
  • Info
    • About the Journal
    • About the Editors
    • ADA Journal Policies
    • Instructions for Authors
    • Guidance for Reviewers
  • Reprints/Reuse
  • Advertising
  • Subscriptions
    • Individual Subscriptions
    • Institutional Subscriptions and Site Licenses
    • Access Institutional Usage Reports
    • Purchase Single Issues
  • Alerts
    • E­mail Alerts
    • RSS Feeds
  • Podcasts
    • Diabetes Core Update
    • Special Podcast Series: Therapeutic Inertia
    • Special Podcast Series: Influenza Podcasts
    • Special Podcast Series: SGLT2 Inhibitors
    • Special Podcast Series: COVID-19
  • Submit
    • Submit a Manuscript
    • Journal Policies
    • Instructions for Authors
    • ADA Peer Review
  • More from ADA
    • Diabetes
    • Clinical Diabetes
    • Diabetes Spectrum
    • ADA Standards of Medical Care
    • ADA Scientific Sessions Abstracts
    • BMJ Open Diabetes Research & Care

User menu

  • Subscribe
  • Log in
  • My Cart

Search

  • Advanced search
Diabetes Care
  • Home
  • Current
    • Current Issue
    • Online Ahead of Print
    • Special Article Collections
    • ADA Standards of Medical Care
  • Browse
    • By Topic
    • Issue Archive
    • Saved Searches
    • Special Article Collections
    • ADA Standards of Medical Care
  • Info
    • About the Journal
    • About the Editors
    • ADA Journal Policies
    • Instructions for Authors
    • Guidance for Reviewers
  • Reprints/Reuse
  • Advertising
  • Subscriptions
    • Individual Subscriptions
    • Institutional Subscriptions and Site Licenses
    • Access Institutional Usage Reports
    • Purchase Single Issues
  • Alerts
    • E­mail Alerts
    • RSS Feeds
  • Podcasts
    • Diabetes Core Update
    • Special Podcast Series: Therapeutic Inertia
    • Special Podcast Series: Influenza Podcasts
    • Special Podcast Series: SGLT2 Inhibitors
    • Special Podcast Series: COVID-19
  • Submit
    • Submit a Manuscript
    • Journal Policies
    • Instructions for Authors
    • ADA Peer Review
Emerging Technologies: Data Systems and Devices

Predicting the Risk of Inpatient Hypoglycemia With Machine Learning Using Electronic Health Records

  1. Yue Ruan1,2,3,
  2. Alexis Bellot4,5,
  3. Zuzana Moysova6,
  4. Garry D. Tan1,2,
  5. Alistair Lumb1,2,
  6. Jim Davies6,
  7. Mihaela van der Schaar4,5 and
  8. Rustam Rea1,2⇑
  1. 1Oxford Centre for Diabetes, Endocrinology and Metabolism, Oxford University Hospitals National Health Service Foundation Trust, Oxford, U.K.
  2. 2Oxford National Institute for Health Research Biomedical Research Centre, Oxford, U.K.
  3. 3Oxford Centre for Diabetes, Endocrinology and Metabolism, University of Oxford, Oxford, U.K.
  4. 4Department of Mathematics, University of Cambridge, Cambridge, U.K.
  5. 5Alan Turing Institute, London, U.K.
  6. 6Big Data Institute, University of Oxford Li Ka Shing Centre for Health Information and Discovery, University of Oxford, Oxford, U.K.
  1. Corresponding author: Rustam Rea, rustam.rea{at}nhs.net
  1. Y.R. and A.B. contributed equally to data analysis.

Diabetes Care 2020 Jul; 43(7): 1504-1511. https://doi.org/10.2337/dc19-1743
PreviousNext
  • Article
  • Figures & Tables
  • Suppl Material
  • Info & Metrics
  • PDF
Loading

Article Figures & Tables

Figures

  • Tables
  • Figure 1
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 1

    ROC curves for logistic regression, XGBoost, and decision tree model when predicting biochemical hypoglycemia.

Tables

  • Figures
  • Table 1

    Potential predictors and how they are represented in the EPR and in the prediction models

    CategoryPredictorData in EPRData in modelsUnitCompleteness (%)Data sets
    DemographicsAgeYear of birthComputed based on the year of admissionyears100IH
    SexMale/femaleBinary variable (1/0)NA100IH
    EthnicityEthnicity (categorical value)Categorical variable (white British, African, etc.)NA100IH
    WeightWeight measured at time of admissionWeight valuekg71IH
    HeightHeight measured at time of admissionHeight valuecm59IH
    Type of diabetesType of diabetes (categorical value)Categorical variable (T1D/T2D/other)NA100IH
    Vital signsDiastolic blood pressureMultiple measurementsAverage value throughout the admissionmmHg73IH
    Systolic blood pressureMultiple measurementsAverage value throughout the admissionmmHg73IH
    Heart rateMultiple measurementsAverage value throughout the admission/min71IH
    Oxygen saturationMultiple measurementsAverage value throughout the admission%73IH
    TemperatureMultiple measurementsAverage value throughout the admissionCelsius72IH
    Laboratory testsAlbuminMultiple measurementsAverage value throughout the admissiong/L81IH
    AmylaseMultiple measurementsAverage value throughout the admissionIU/L15IH
    C-peptideMultiple measurementsAverage value throughout the admissionpmol/L17IH
    CortisolMultiple measurementsAverage value throughout the admissionnmol/L26IH
    CreatinineMultiple measurementsAverage value throughout the admissionμmol/L80IH
    C-reactive proteinMultiple measurementsAverage value throughout the admissionmg/L78IH
    eGFRMultiple measurementsAverage value throughout the admissionmL/min/1.73 m280IH
    HemoglobinMultiple measurementsAverage value throughout the admissiong/L80IH
    HbA1cMultiple measurementsAverage value throughout the admission%42IH
    PotassiumMultiple measurementsAverage value throughout the admissionmmol/L80IH
    SodiumMultiple measurementsAverage value throughout the admissionmmol/L80IH
    White cellsMultiple measurementsAverage value throughout the admission× 109/L79IH
    MedicationsSulfonylureaDrug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    DPP-4Drug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    GLP-1Drug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    MetforminDrug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    MorphineDrug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    PioglitazoneDrug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    BisoprololDrug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    AmitriptylineDrug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    PregabalinDrug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    DexamethasoneDrug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    PrednisoloneDrug dose and timeBinary variable (1 for on drug and 0 for not)NA100IH
    Intravenous insulinMultiple rates of insulin infusionBinary variable (1 for on i.v. insulin and 0 for not)NA100IH+
    Insulin (rapid-acting analog)Multiple doses of different amountAverage total daily insulin doseunit100IH+
    Insulin (mixed analog)Multiple doses of different amountAverage total daily insulin doseunit100IH+
    Insulin (long-acting analog)Multiple doses of different amountAverage total daily insulin doseunit100IH+
    Insulin (short-acting human)Multiple doses of different amountAverage total daily insulin doseunit100IH+
    Insulin (mixed human)Multiple doses of different amountAverage total daily insulin doseunit100IH+
    Insulin (intermediate-acting human)Multiple doses of different amountAverage total daily insulin doseunit100IH+
    ProceduresProcedure indicationProcedure name and timeBinary variable (1 for had at least one procedure during the admission and 0 for not)NA100IH+
    Previous hypoglycemiaPrevious biochemical hypoglycemiaBlood glucose measurementsBinary variable (1 for had at least one blood glucose <4 mmol/L)NA63PH
    Previous clinically significant hypoglycemiaBlood glucose measurementsBinary variable (1 for had at least one blood glucose <3 mmol/L)NA63PH
    • DPP-4, dipeptidyl peptidase 4; GLP-1, glucagon-like peptide 1; NA, not applicable; T1D, type 1 diabetes; T2D, type 2 diabetes.

    • Insulin (rapid-acting analog): “Insulin aspart,” “Insulin lispro,” “Insulin glulisine,” “Insulin faster acting aspart.”

    • Insulin (mixed analog): “Insulin aspart biphasic (Novomix 30),” “Insulin lispro biphasic (Humalog Mix 25 and Humalog Mix 50).”

    • Insulin (long-acting analog): “Insulin glargine,” “Insulin detemir,” “Insulin degludec.”

    • Insulin (short-acting human): “Insulin Actrapid,” “Insulin Humulin S.”

    • Insulin (mixed human): “Insulin Humulin M3.”

    • Insulin (intermediate-acting human): “Insulin Insulatard,” “Insulin Humulin I.”

  • Table 2

    Baseline characteristics and glycemic outcomes of the inpatients cohorts

    PredictorsInpatients with diabetes (N = 17,658)
    Inpatient hospital admissions (n = 32,758)
    Sex, N (%)
     Female8,381 (47)
     Male9,277 (53)
    Age, mean (SD)66 (18)
    Ethnicity, N (%)
     White British12,511 (70.8)
     African116 (0.7)
     Pakistani331 (1.9)
     Chinese53 (0.3)
     Indian254 (1.4)
     Not stated2,869 (16.2)
     Other1,524 (8.6)
    Type of diabetes, N (%)
     Insulin-dependent diabetes1,696 (9.6)
     Non–insulin-dependent diabetes14,006 (79.3)
     Other forms1,956 (11.1)
    Systolic blood pressure, mean (SD)132.5 (18.2)
    eGFR, mean (SD)29.8 (6.4)
    Medication use
     Sulfonylurea, n (%)6,435 (19.6)
     DPP-4, n (%)1,415 (4.3)
     GLP-1, n (%)349 (1.1)
     Metformin, n (%)10,756 (32.8)
     Insulin, n (%)
      Intravenous insulin4,678 (14.3)
      Rapid-acting analog3,954 (12.1)
      Mixed-acting analog1,553 (4.7)
      Long-acting analog5,118 (15.6)
      Short-acting human3,561 (10.9)
      Mixed-acting human1,388 (4.2)
      Intermediate-acting human2,394 (7.3)
     Procedures, n (%)22,931 (70.0)
    Glycemic outcomes
     Hypoglycemia, n (%)
      Biochemical hypoglycemia7,030 (21.5)
      Clinically significant hypoglycemia3,154 (9.6)
     BG level, mean (SD)10.1 (4.7)
    • N (%), number of patients and percentage over the total number of patients; n (%), number of admissions and percentage over the total number of admissions. DPP-4, dipeptidyl peptidase 4; GLP-1, glucagon-like peptide 1. Insulin (rapid-acting analog): “Insulin aspart, ” “Insulin lispro, ” “Insulin glulisine, ” “Insulin faster acting aspart. ” Insulin (mixed analog): “Insulin aspart biphasic (Novomix 30), ” “Insulin lispro biphasic (Humalog Mix 25 and Humalog Mix 50). ” Insulin (long-acting analog): “Insulin glargine, ” “Insulin detemir, ” “Insulin degludec. ” Insulin (short-acting human): “Insulin Actrapid, ” “Insulin Humulin S. ” Insulin (mixed human): “Insulin Humulin M3. ” Insulin (intermediate-acting human): “Insulin Insulatard, ” “Insulin Humulin I. ”

  • Table 3

    Performance metrics of the machine learning models based on the PH data set

    Machine learning algorithmBiochemical hypoglycemia (BG <4 mmol/L)Clinically significant hypoglycemia (BG <3 mmol/L)
    AUROCPrecisionRecallAUROCPrecisionRecall
    Logistic regression0.730.480.100.750.390.10
    SGD0.740.120.100.770.100.10
    kNN0.620.400.180.620.300.15
    Decision tree0.810.700.710.840.680.73
    Gaussian-naive Bayes0.810.470.680.860.330.81
    Bernoulli-naive Bayes0.820.600.600.860.470.67
    Multinomial-naive Bayes0.750.100.100.790.100.10
    SVM0.790.730.100.830.410.10
    QDA0.770.230.960.890.150.97
    Random forest0.940.860.670.930.960.66
    Extra trees0.930.850.680.930.940.66
    LDA0.880.690.750.900.720.72
    Passive aggressive0.760.460.250.770.330.10
    AdaBoost0.890.680.600.930.630.46
    Bagging0.930.840.700.920.930.67
    Gradient boosting0.960.870.700.960.960.67
    XGBoost0.960.880.700.960.970.67
    MLP0.740.570.170.780.470.14
    Mean (SD)0.82 (0.10)0.59 (0.25)0.49 (0.29)0.85 (0.10)0.55 (0.31)0.48 (0.31)
    • kNN, k-nearest neighbor; LDA, linear discriminant analysis; MLP, multilayer perceptron (artificial neural network); QDA, quadratic discriminant analysis; SGD, stochastic gradient descent; SVM, support vector machine.

  • Table 4

    Most significant predictors from the logistic regression model

    PredictorsBiochemical hypoglycemia (BG <4 mmol/L)Clinically significant hypoglycemia (BG <3 mmol/L)
    CoefficientP valuez scoreCoefficientP valuez score
    PrevLowGlucose3 (+)3.842<0.00128.424.021<0.00120.39
    Albumin level (−)−0.078<0.001−27.22−0.074<0.001−19.51
    Intravenous insulin (+)0.639<0.00115.430.501<0.0019.82
    Procedure indication (+)0.485<0.00114.870.339<0.0016.81
    Sulfonylurea (+)0.572<0.00114.240.311<0.0015.35
    Type 2 diabetes (−)−0.820<0.001−13.68−0.656<0.001−7.88
    Weight (−)−0.010<0.001−7.42−0.012<0.001−6.38
    Oxygen saturation (+)0.059<0.0016.310.067<0.0015.30
    Metformin (−)−0.212<0.001−6.02−0.258<0.001−5.02
    Long-acting human insulin (+)0.011<0.004.770.010<0.0015.35
    Rapid-acting human insulin (+)0.023<0.0014.11NS
    Mixed insulin analog (+)0.007<0.0013.67NS
    • Factors with a positive coefficient value increase the risk of hypoglycemia, and factors with a negative coefficient value decrease the risk of hypoglycemia. The factors are listed in order of effect size on the logistic regression model, e.g., an increase in albumin value reduces the risk of hypoglycemia, people with type 2 diabetes have an decreased risk of hypoglycemia. A “+” or “−” sign is given to each of the factors to indicate the effect direction. NS, not significant.

PreviousNext
Back to top
Diabetes Care: 43 (7)

In this Issue

July 2020, 43(7)
  • Table of Contents
  • Table of Contents (PDF)
  • About the Cover
  • Index by Author
  • Masthead (PDF)
Sign up to receive current issue alerts
View Selected Citations (0)
Print
Article Alerts
Sign In to Email Alerts with your Email Address
Email Article

Thank you for your interest in spreading the word about Diabetes Care.

NOTE: We only request your email address so that the person you are recommending the page to knows that you wanted them to see it, and that it is not junk mail. We do not capture any email address.

Enter multiple addresses on separate lines or separate them with commas.
Predicting the Risk of Inpatient Hypoglycemia With Machine Learning Using Electronic Health Records
(Your Name) has forwarded a page to you from Diabetes Care
(Your Name) thought you would like to see this page from the Diabetes Care web site.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Citation Tools
Predicting the Risk of Inpatient Hypoglycemia With Machine Learning Using Electronic Health Records
Yue Ruan, Alexis Bellot, Zuzana Moysova, Garry D. Tan, Alistair Lumb, Jim Davies, Mihaela van der Schaar, Rustam Rea
Diabetes Care Jul 2020, 43 (7) 1504-1511; DOI: 10.2337/dc19-1743

Citation Manager Formats

  • BibTeX
  • Bookends
  • EasyBib
  • EndNote (tagged)
  • EndNote 8 (xml)
  • Medlars
  • Mendeley
  • Papers
  • RefWorks Tagged
  • Ref Manager
  • RIS
  • Zotero
Add to Selected Citations
Share

Predicting the Risk of Inpatient Hypoglycemia With Machine Learning Using Electronic Health Records
Yue Ruan, Alexis Bellot, Zuzana Moysova, Garry D. Tan, Alistair Lumb, Jim Davies, Mihaela van der Schaar, Rustam Rea
Diabetes Care Jul 2020, 43 (7) 1504-1511; DOI: 10.2337/dc19-1743
del.icio.us logo Digg logo Reddit logo Twitter logo CiteULike logo Facebook logo Google logo Mendeley logo
  • Tweet Widget
  • Facebook Like
  • Google Plus One

Jump to section

  • Article
    • Abstract
    • Introduction
    • Research Design and Methods
    • Results
    • Conclusions
    • Article Information
    • Footnotes
    • References
  • Figures & Tables
  • Suppl Material
  • Info & Metrics
  • PDF

Related Articles

Cited By...

More in this TOC Section

  • Thresholds of Glycemia and the Outcomes of COVID-19 Complicated With Diabetes: A Retrospective Exploratory Study Using Continuous Glucose Monitoring
  • Improved Glycemic Outcomes With Medtronic MiniMed Advanced Hybrid Closed-Loop Delivery: Results From a Randomized Crossover Trial Comparing Automated Insulin Delivery With Predictive Low Glucose Suspend in People With Type 1 Diabetes
  • The SEE Study: Safety, Efficacy, and Equity of Implementing Autonomous Artificial Intelligence for Diagnosing Diabetic Retinopathy in Youth
Show more Emerging Technologies: Data Systems and Devices

Similar Articles

Navigate

  • Current Issue
  • Standards of Care Guidelines
  • Online Ahead of Print
  • Archives
  • Submit
  • Subscribe
  • Email Alerts
  • RSS Feeds

More Information

  • About the Journal
  • Instructions for Authors
  • Journal Policies
  • Reprints and Permissions
  • Advertising
  • Privacy Policy: ADA Journals
  • Copyright Notice/Public Access Policy
  • Contact Us

Other ADA Resources

  • Diabetes
  • Clinical Diabetes
  • Diabetes Spectrum
  • Scientific Sessions Abstracts
  • Standards of Medical Care in Diabetes
  • BMJ Open - Diabetes Research & Care
  • Professional Books
  • Diabetes Forecast

 

  • DiabetesJournals.org
  • Diabetes Core Update
  • ADA's DiabetesPro
  • ADA Member Directory
  • Diabetes.org

© 2021 by the American Diabetes Association. Diabetes Care Print ISSN: 0149-5992, Online ISSN: 1935-5548.