TY - JOUR T1 - Using Machine Learning to Predict Primary Care and Advance Workforce Research JF - The Annals of Family Medicine JO - Ann Fam Med SP - 334 LP - 340 DO - 10.1370/afm.2550 VL - 18 IS - 4 AU - Peter Wingrove AU - Winston Liaw AU - Jeremy Weiss AU - Stephen Petterson AU - John Maier AU - Andrew Bazemore Y1 - 2020/07/01 UR - http://www.annfammed.org/content/18/4/334.abstract N2 - PURPOSE To develop and test a machine-learning–based model to predict primary care and other specialties using Medicare claims data.METHODS We used 2014-2016 prescription and procedure Medicare data to train 3 sets of random forest classifiers (prescription only, procedure only, and combined) to predict specialty. Self-reported specialties were condensed to 27 categories. Physicians were assigned to testing and training cohorts, and random forest models were trained and then applied to 2014-2016 data sets for the testing cohort to generate a series of specialty predictions. Comparing the predicted specialty to self-report, we assessed performance with F1 scores and area under the receiver operating characteristic curve (AUROC) values.RESULTS A total of 564,986 physicians were included. The combined model had a greater aggregate (macro) F1 score (0.876) than the prescription-only (0.745; P <.01) or procedure-only (0.821; P <.01) model. Mean F1 scores across specialties in the combined model ranged from 0.533 to 0.987. The mean F1 score was 0.920 for primary care. The mean AUROC value for the combined model was 0.992, with values ranging from 0.982 to 0.999. The AUROC value for primary care was 0.982.CONCLUSIONS This novel approach showed high performance and provides a near real-time assessment of current primary care practice. These findings have important implications for primary care workforce research in the absence of accurate data. ER -