Using Machine Learning to Predict Pedestrian Phone Usage
摘要
Pedestrians operating smartphones while walking became increasingly common, leading to various safety issues. Therefore, this study aimed to utilize machine learning techniques, via data collected from inertial sensing components, to develop a model that accurately identified behaviors under scenarios with or without smartphone usage. A total of 10 participants took part in the experiment, performing smartphone use tasks while data were recorded by five inertial measurement units. Multiple time-domain and frequency-domain features were then extracted, including mean, standard deviation, and kurtosis, for modeling and analysis. K-Nearest Neighbor (KNN) and Random Forest (RF) were employed as machine learning models, with parameter optimization carried out through grid search, and model evaluation conducted using ten-fold cross-validation. The results showed that the RF model outperformed the KNN model in terms of accuracy (0.94), precision (0.94), recall (0.94), and F1-Score (0.94), exhibiting more stable performance and stronger adaptability overall. Further cross-validation learning curve analysis confirmed that the RF model demonstrated greater generalization capability in handling diverse data, whereas the KNN model tended to overfit and thus performed less effectively on the test set. These findings demonstrated the feasibility of using gait parameters for pedestrian behavior recognition and proved that the Random Forest model possessed significant advantages when dealing with complex tasks.