Anxiety is a common psychological disorder experienced by individuals and has the potential to reduce quality of life if not treated properly. This study aims to classify anxiety levels into four categories, namely normal, mild, moderate, and severe, using the Extreme Gradient Boosting (XGBoost) algorithm. The data used came from the Kaggle platform, consisting of 671 entries with 11 anxiety symptom features and one target label. The research process involved data exploration (EDA), handling missing values, data balancing using the Synthetic Minority Oversampling Technique (SMOTE), and feature selection based on multivariate correlation. Two models were built with training and test split ratios of 70:30 and 80:20. The evaluation results showed that the XGBoost model achieved good classification performance, with accuracy, precision, recall, and F1-score reaching 93% after optimization. The best model was then implemented as a Streamlit web application to facilitate interactive prediction of anxiety levels. This research is expected to be a tool for initial screening of anxiety disorders and a reference in the development of machine learning-based classification systems in the field of mental health.
Copyrights © 2026