Enhancing happiness and life satisfaction in university students: analysis with a machine learning approach - Long, Qing; Wang, Yuning; Axelin, Anna; Zheng, Feng; Cao, Zeng; Li, Xiaotian; Guo, Jia (BioMed Central, 2026)
Background
Subjective well-being (SWB) is vital for the personal growth of university students. Machine learning approach have been increasingly used in identifying SWB predictors for their ability to capture complex and multidimensional predictors. Still, the feature selection is not often justified from a theoretical perspective.
Objective
Under the guidance of the conceptual model of psychology and public health, this study aims to apply machine learning to identify the top predictors of happiness and life satisfaction (LS) as the two components of SWB among a sample of university students.
Methods
This cross-sectional study analyzed university students from the China Family Panel Studies, including 816 participants from the 2022 wave for model development and 724 from the 2020 wave for external validation. The development set was randomly split into a training set (70%) and a test set (30%). Forty-two variables across the conceptual model of psychology and public health were included. Missing values were imputed using multiple imputation, LASSO regression was used for feature selection, and SMOTE-IPF addressed class imbalance. Five tree-based machine learning models (Random Forest, AdaBoost, Gradient Boosting, XGBoost, and LightGBM) were trained with 10-fold cross-validation, and the best model was chosen according to cross-validated AUC. Performance was further evaluated in the internal test and external validation sets using ROC and PR curves, accuracy, sensitivity, specificity, F1-score, and other metrics. The model explanation was enhanced with SHAP values to assess the detailed contribution of each predictor and Venn diagrams to evaluate shared predictors of happiness and LS.
Results
Among 816 university students, 15.9% reported low happiness and 28.9% reported low LS in the development set, with similar proportions observed in the external validation set. The Random Forest model achieved the best performance for happiness prediction (AUC = 0.831 in the test set and 0.741 in the external validation set), while XGBoost performed best for LS (AUC = 0.730 and 0.748, respectively). SHAP analysis revealed interpersonal relationships were the strongest predictor of happiness, while future confidence was the top predictor of LS. Shared predictors across both outcomes included future confidence, interpersonal relationships, depressive symptoms, and the relationship with mother.
Conclusions
The machine learning approach demonstrates good predictive performance, thus may offer new thoughts for supporting SWB among university students, such as strengthening interpersonal relationships and fostering future confidence.