Abstract
This study introduces GaitX, a real-time pedestrian behavior recognition system that leverages only the built-in sensors of a smartphone eliminating the need for external hardware. The system is capable of detecting abnormal walking behavior, such as using a smartphone while walking, regardless of whether the device is handheld or pocketed. GaitX applies multivariate time-series features derived from accelerometer data, using ensemble machine learning models like XGBoost and Random Forest for classification. Experimental validation across 21 subjects demonstrated an average classification accuracy of 92.3%, with notably high precision (97.1%) in identifying distracted walking. In addition to real-time detection, the system explores the link between gait variability and psychological traits by integrating MBTI personality profiling, revealing the potential for emotion-aware mobility analytics. Our findings offer a scalable, cost-effective solution for mobile safety applications and personalized health monitoring.