This study aims to develop a machine learning-based intelligent system to detect health risks in coffee drinkers through a lifestyle analysis approach. The background of this study is based on the increasing consumption of coffee as part of a modern lifestyle, which has the potential to cause various health risks if not balanced with a healthy lifestyle. The dataset was collected through a survey covering several important variables, such as coffee consumption frequency, sugar intake, sleep duration, physical activity level, body mass index (BMI), and blood pressure. The research stages included data preprocessing, normalization, and classification using three algorithms: Random Forest and Gradient Boosting. Model performance was evaluated using accuracy, precision, recall, and F1-score metrics to ensure the system’s reliability. Test results showed that the Random Forest algorithm performed best with an accuracy of 0.91, followed by Gradient Boosting with an accuracy of 0.90. Further analysis revealed that the variables most influential on health risks are coffee consumption frequency, sleep duration, and sugar intake. The developed system proved effective in detecting health risks early and has the potential to serve as a data-driven educational tool to raise public awareness of the importance of a healthy lifestyle.
Copyrights © 2026