Student mental health is a growing concern due to increasing academic pressure, social demands, and economic factors affecting their well-being. Depression, a common issue among students, significantly impacts academic performance and overall quality of life. Therefore, early detection and accurate prediction of student mental health conditions are essential to provide timely interventions. This study aims to improve the accuracy of depression prediction among university students by integrating Particle Swarm Optimization (PSO) for feature selection with Random Forest (RF) as the classification model. The dataset used is the Student Depression Dataset from Kaggle, consisting of 27,900 respondents with 18 features related to demographic, academic, and psychological factors. Data preprocessing includes handling missing values, normalization, categorical encoding, and feature selection using PSO. The model is trained and evaluated using 10-Fold Cross-Validation. Experimental results show that PSO-optimized Random Forest outperforms the standard Random Forest model. The optimized model achieves an accuracy of 84.08%, precision of 82.79%, recall of 77.79%, and an AUC-ROC score of 0.912, improving classification performance. These findings demonstrate that PSO effectively enhances feature selection, leading to better classification accuracy. This study contributes to the development of a more accurate and efficient machine learning model for detecting student depression. By optimizing feature selection, this approach reduces computational complexity while maintaining high predictive performance. Future research can explore hybrid optimization techniques such as Genetic Algorithm (GA) or Differential Evolution (DE) to further enhance model generalization across different datasets.
                        
                        
                        
                        
                            
                                Copyrights © 2025