development and application of a machine learning approach to assess shortterm mortality risk among patients with cancer starting chemotherapy importance patients with cancer who die soon after starting chemotherapy incur costs of treatment without the benefits accurately predicting mortality risk before administering chemotherapy is important but few patient datadriven tools existobjective to create and validate a machine learning model that predicts mortality in a general oncology cohort starting new chemotherapy using only data available before the first day of treatmentdesign setting and participants this retrospective cohort study of patients at a large academic cancer center from january 1 2004 through december 31 2014 determined date of death by linkage to social security data the model was derived using data from 2004 through 2011 and performance was measured on nonoverlapping data from 2012 through 2014 the analysis was conducted from june 1 through august 1 2017 participants included 26946 patients starting 51774 new chemotherapy regimensmain outcomes and measures thirtyday mortality from the first day of a new chemotherapy regimen secondary outcomes included model discrimination by predicted mortality risk decile among patients receiving palliative chemotherapy and 180day mortality from the first day of a new chemotherapy regimenresults among the 26946 patients included in the analysis mean age was 587 years 95 ci 585589 years 611 were female 95 ci 604619 and 869 were white 95 ci 864874 thirtyday mortality from chemotherapy start was 21 95 ci 1924 among the 9114 patients in the validation set the most common primary cancers were breast 211 95 ci 202219 colorectal 193 95 ci 185202 and lung 180 95 ci 172188 model predictions were accurate for all patients area under the curve auc 0940 95 ci 09300951 predictions for patients starting palliative chemotherapy 466 of regimens 95 ci 458473 for whom prognosis is particularly important remained highly accurate auc 0924 95 ci 09100939 to illustrate model discrimination patients were ranked initiating palliative chemotherapy by modelpredicted mortality risk and observed mortality was calculated by risk decile thirtyday mortality in the highestrisk decile was 226 95 ci 196256 in the lowestrisk decile no patients died predictions remained accurate across all primary cancers stages and chemotherapies even for clinical trial regimens that first appeared in years after the model was trained auc 0942 95 ci 08821000 the same model also performed well for prediction of 180day mortality auc for all patients 0870 95 ci 08620877 highest vs lowestrisk decile mortality 748 95 ci 727770 vs 02 95 ci 00104 predictions were more accurate than estimates from randomized clinical trials of individual chemotherapies or the surveillance epidemiology and end results data setconclusions and relevance a machine learning algorithm using electronic health record data accurately predicted shortterm mortality among patients starting chemotherapy further research is necessary to determine the generalizability and feasibility of applying this algorithm in clinical settings