###### Abstract  
This study explores Human Activity Recognition (HAR) using smartphone sensors to address the challenges posed by position-dependent datasets. We propose a position-independent system that leverages data from accelerometers, gyroscopes, linear accelerometers, and gravity sensors collected from smartphones placed either on the chest or in the left/right leg pocket. The performance of traditional machine learning algorithms (Decision Trees (DT), K-Nearest Neighbors (KNN), Random Forest (RF), Support Vector Classifier (SVC), and XGBoost) is compared against deep learning models (Gated Recurrent Unit (GRU), Long Short-Term Memory (LSTM), Temporal Convolutional Networks (TCN), and Transformer models) under two sensor configurations. Our findings highlight that the Temporal Convolutional Network (TCN) model consistently outperforms other models, particularly in the four-sensor non-overlapping configuration, achieving the highest accuracy of 97.70%. Deep learning models such as LSTM, GRU, and Transformer also demonstrate strong performance, showcasing their effectiveness in capturing temporal dependencies in HAR tasks. Traditional machine learning models, including RF and XGBoost, provide reasonable performance but do not match the accuracy of deep learning models. Additionally, incorporating data from linear accelerometers and gravity sensors led to slight improvements over using accelerometer and gyroscope data alone. This research enhances the recognition of passenger behaviors for intelligent transportation systems, contributing to more efficient congestion management and emergency response strategies. os 20242012204122  
to the development of intelligent transportation systems designed to improve traffic flow, enhance passenger safety, and maximize vehicle efficiency, ultimately fostering more adaptive and efficient transportation networks. HAR identifies a variety of human activities, from basic gestures to complex movements, using raw sensor data [2]. Earlier studies predominantly utilized vision-based approaches, including RGB cameras and Kinect sensors, for activity classification and analysis [3; 4; 5]. Although these methods provide precise activity recognition and are suitable for long-range monitoring, they raise significant privacy concerns and face challenges in large-scale implementation [6]. In contrast, motion sensors such as accelerometers and gyroscopes embedded in smartphones offer a cost-effective, mobile alternative that alleviates privacy issues associated with vision-based techniques. By integrating HAR with smartphone sensors and employing deep learning methods, the accuracy of activity recognition can be significantly improved. Recent studies have demonstrated notable advancements in HAR using smartphone sensors. [PERSON] et al. achieved an impressive 99.06% accuracy in classifying activities such as walking, walking downstairs, walking upstairs, sitting, standing, and lying down by leveraging accelerometer and gyroscope data from a Samsung Galaxy S2. Their approach utilized an Artificial Neural Network (ANN), which proved highly effective in accurately classifying these activities based on the sensor data, showcasing the potential of ANN for robust human activity recognition systems [7]. [PERSON] et al. introduced a flexible sensor-based HAR system utilizing smartphones and wearable devices, employing Support Vector Machines (SVM) for activity recognition [8]. [PERSON] and [PERSON] conducted a comparative analysis of machine learning techniques for transportation mode detection using smartphone sensors, emphasizing the effectiveness of Random Forest (RF) and SVM [9]. Similarly, [PERSON] et al. evaluated smartphone sensor data for travel behavior analysis, identifying limitations in data accuracy due to hardware constraints. These constraints include sensor precision, variations in sampling rates, and noise, which are inherent to smartphone hardware, as well as inconsistencies across different device models.