Smartphone addiction has become a growing behavioral concern, particularly among adolescents and young adults, due to the widespread use of mobile devices and digital platforms. Excessive smartphone usage has been associated with negative outcomes such as reduced academic performance, sleep disturbances, and psychological stress. Therefore, accurate identification of smartphone addiction patterns is essential for developing effective intervention and prevention strategies. This study proposes a machine learning framework for smartphone addiction classification using behavioral data and ensemble learning techniques. Several baseline machine learning algorithms, including LR, SVM, RF, and ANN, were implemented and compared with advanced gradient boosting algorithms. The proposed approach integrates XGBoost and LightGBM within an ensemble framework to improve predictive performance and model robustness. The dataset was preprocessed using feature encoding, normalization, and feature selection techniques prior to model training. Model performance was evaluated using multiple classification metrics, including accuracy, precision, recall, F1-score, AUC, and training and testing error rates. Experimental results demonstrate that the proposed ensemble model achieved the best overall performance with a training accuracy of 0.970 and testing accuracy of 0.948, significantly outperforming baseline models. In comparison, Logistic Regression achieved 0.860 training accuracy and 0.842 testing accuracy, while Random Forest and ANN achieved testing accuracies of 0.892 and 0.901, respectively. The ensemble model also produced the lowest training error (0.030) and testing error (0.052) among all evaluated models, indicating improved generalization capability and reduced prediction variance. Furthermore, SHAP analysis was applied to interpret model predictions and identify key behavioral factors influencing smartphone addiction. The results indicate that social media usage, academic stress, night-time smartphone activity, and sleep duration are the most influential predictors. Overall, the findings demonstrate that ensemble gradient boosting models, combined with interpretable AI techniques, provide an effective and reliable approach to smartphone addiction detection and behavioral analysis.