Related Experiment Video
Updated: Feb 28, 2026

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Predictive machine learning algorithms for depression and anxiety disorders in six cancer types: a comprehensive
Soon-Keu Ling1, Li-Mei Wang2, Kuo-Piao Chung3
1Department of Digestive Surgery, Yuan's General Hospital, Kaohsiung, 80249, Taiwan.
Objective:
Machine learning (ML) has advanced predictive modeling in medical diagnosis and risk assessment through large clinical datasets, yet applications for predicting post-cancer depression and anxiety remain limited. This cross-institutional, longitudinal study aims to develop ML models to predict depression and anxiety in cancer patients and to identify key contributing factors.
Methods:
ML models were developed and validated to predict depression and anxiety disorders within one year of six cancer diagnoses across three medical centers in Taiwan, from January 2017 to December 2022 (n = 24,580). Study variables included demographic, clinical, and quality of care attributes. ML algorithms employed include Logistic Regression (LR), Random Forest (RF), K-Nearest Neighbor (KNN), Adaptive Boosting (AdaBoost), and Extreme Gradient Boosting (XGBoost). Model performance was evaluated using accuracy, precision, recall, F1 score, and area under the receiver operating characteristic (AUROC) curve. Statistical analysis was conducted with SPSS 26.0 and Spyder 3.8 (Python).
Results:
The XGBoost model significantly outperformed others, achieving 98.30% accuracy, 98.17% precision, 98.30% F1 score, and 99.72% AUROC (P < 0.001). Feature importance analysis identified tumor size, age, and body mass index as the top risk factors for depression and anxiety disorders within one year of a cancer diagnosis.
Conclusions:
ML algorithms advance the understanding of depression and anxiety in cancer patients by leveraging longitudinal data to identify key predictive factors. These models not only enhance mental health care and treatment quality but also provide insights that inform evidence-based guidelines, thereby improving outcomes for patients, families, and healthcare providers during cancer care.
Related Concept Videos
Cancer Survival Analysis
Combination Therapies and Personalized Medicine
The combination of the drug acetazolamide and sulforaphane is a good example of combination therapy to treat cancer. The cells in the interior of a large tumor often die due to the hypoxic and...
