Mendeteksi Unsur Depresi pada Unggahan Media Sosial Menggunakan Metode Machine Learning dengan Optimasi Berbasis Inspirasi Alam - Santoso, Zein Rizky; Wigena, Aji Hamim; Kurnia, Anang (Hasanuddin University, 2025)
Social media has now become an inseparable part of everyday life, including in expressing emotions and mental states. One popular platform is X (formerly Twitter), where many users indirectly share signs of depression. This study develops a classification model to detect indications of depression in social media posts, using machine learning algorithms and feature selection techniques based on nature-inspired algorithms. The classification algorithms used include Naïve Bayes, k-Nearest Neighbors (k-NN), Decision Tree, Random Forest, and XGBoost. Each algorithm is combined with feature selection techniques using Particle Swarm Optimization (PSO), Bat Algorithm (BA), and Flamingo Search Algorithm (FSA). The models are evaluated based on accuracy, precision, recall, F1-score, and the number of features used. The results show that the combination of the Random Forest method with FSA-based feature selection (RF-FSA) delivers the best performance, with an accuracy of 82.2%, balanced precision and recall, and efficient feature usage. Another strong alternative is XGBoost with FSA (XGB-FSA), although it requires more features and longer computational time. This study demonstrates that selecting the right feature selection algorithm, particularly FSA, can significantly improve both the accuracy and efficiency of depression text classification models. The resulting model is expected to serve as a useful tool for early detection of depression symptoms from social media posts, allowing for quicker and more targeted interventions.