%0 Journal Article %@ 2369-1999 %I JMIR Publications %V 11 %N %P e62833 %T Association Between Risk Factors and Major Cancers: Explainable Machine Learning Approach %A Huang,Xiayuan %A Ren,Shushun %A Mao,Xinyue %A Chen,Sirui %A Chen,Elle %A He,Yuqi %A Jiang,Yun %K electronic health record %K EHR %K cancer risk modeling %K risk factor analysis %K explainable machine learning %K machine learning %K ML %K risk factor %K major cancers %K monitoring %K cancer risk %K breast cancer %K colorectal cancer %K lung cancer %K prostate cancer %K cancer patients %K clinical decision-making %D 2025 %7 2.5.2025 %9 %J JMIR Cancer %G English %X Background: Cancer is a life-threatening disease and a leading cause of death worldwide, with an estimated 611,000 deaths and over 2 million new cases in the United States in 2024. The rising incidence of major cancers, including among younger individuals, highlights the need for early screening and monitoring of risk factors to manage and decrease cancer risk. Objective: This study aimed to leverage explainable machine learning models to identify and analyze the key risk factors associated with breast, colorectal, lung, and prostate cancers. By uncovering significant associations between risk factors and these major cancer types, we sought to enhance the understanding of cancer diagnosis risk profiles. Our goal was to facilitate more precise screening, early detection, and personalized prevention strategies, ultimately contributing to better patient outcomes and promoting health equity. Methods: Deidentified electronic health record data from Medical Information Mart for Intensive Care (MIMIC)–III was used to identify patients with 4 types of cancer who had longitudinal hospital visits prior to their diagnosis presence. Their records were matched and combined with those of patients without cancer diagnoses using propensity scores based on demographic factors. Three advanced models, penalized logistic regression, random forest, and multilayer perceptron (MLP), were conducted to identify the rank of risk factors for each cancer type, with feature importance analysis for random forest and MLP models. The rank biased overlap was adopted to compare the similarity of ranked risk factors across cancer types. Results: Our framework evaluated the prediction performance of explainable machine learning models, with the MLP model demonstrating the best performance. It achieved an area under the receiver operating characteristic curve of 0.78 for breast cancer (n=58), 0.76 for colorectal cancer (n=140), 0.84 for lung cancer (n=398), and 0.78 for prostate cancer (n=104), outperforming other baseline models (P<.001). In addition to demographic risk factors, the most prominent nontraditional risk factors overlapped across models and cancer types, including hyperlipidemia (odds ratio [OR] 1.14, 95% CI 1.11‐1.17; P<.01), diabetes (OR 1.34, 95% CI 1.29‐1.39; P<.01), depressive disorders (OR 1.11, 95% CI 1.06‐1.16; P<.01), heart diseases (OR 1.42, 95% CI 1.32‐1.52; P<.01), and anemia (OR 1.22, 95% CI 1.14‐1.30; P<.01). The similarity analysis indicated the unique risk factor pattern for lung cancer from other cancer types. Conclusions: The study’s findings demonstrated the effectiveness of explainable ML models in assessing nontraditional risk factors for major cancers and highlighted the importance of considering unique risk profiles for different cancer types. Moreover, this research served as a hypothesis-generating foundation, providing preliminary results for future investigation into cancer diagnosis risk analysis and management. Furthermore, expanding collaboration with clinical experts for external validation would be essential to refine model outputs, integrate findings into practice, and enhance their impact on patient care and cancer prevention efforts. %R 10.2196/62833 %U https://cancer.jmir.org/2025/1/e62833 %U https://doi.org/10.2196/62833