Comparison of Linear Regression, Decision Tree Regression, and Random Forest Regression Algorithms in Predicting Baldness Risk - Mola, Sebastianus Adi Santoso; Goru, Alfonsus Maria De Liguori; Lamapaha, Christian Jaquelino; Bekayo, Yoseph Kurubingan (MATICS: Jurnal Ilmu Komputer dan Teknologi Informasi (Journal of Computer Science and Information Technology), 2025)
Abstract—Baldness is a common condition affecting both men and women, primarily caused by age, hormones, and genetics. Predicting the risk of baldness is crucial for early diagnosis and prevention of further hair loss. This study aims to compare the performance of Linear Regression (LR), Decision Tree Regression (DTR), and Random Forest Regression (RFR) in predicting baldness risk using data with variables such as age, gender, occupation, stress levels, and other lifestyle factors. A dataset of 5925 samples was processed through a series of steps, including normalization, parameter tuning, cross-validation, and residual analysis. The results show that Random Forest Regression outperformed other models with the lowest MSE (0.0979) and the highest R² (0.9056) on both training and testing data, followed by Decision Tree Regression and Linear Regression. Hyperparameter optimization using Grid Search significantly enhanced model performance. In conclusion, Random Forest Regression is the most suitable model for predicting baldness risk with complex datasets, while Linear Regression remains a viable alternative for simpler datasets.