Aggressive driving behaviour classification using smartphone’s accelerometer sensor Sanjay Kumar Sonbhadra Department of IT IIIT, Allahabad Prayagraj, India rsi2017502@iiita.ac.in Sonali Agarwal Department of IT IIIT, Allahabad Prayagraj, India sonali@iiita.ac.in Mohammad Syafrullah Program of master in CS Universitas Budi Luhur Jakarta, Indonesia mohammad.syafrullah@budiluhur.ac.id Krisna Adiyarta Program of master in CS Universitas Budi Luhur Jakarta, Indonesia krisna.adiyarta@budiluhur.ac.id Abstract—Aggressive driving is the most common factor of road accidents, and millions of lives are compromised every year. Early detection of aggressive driving behaviour can reduce the risks of accidents by taking preventive measures. The smart- phone’s accelerometer sensor data is mostly used for driving behavioural detection. In recent years, many research works have been published concerning to behavioural analysis, but the state of the art shows that still, there is a need for a more reliable prediction system because individually, each method has it’s own limitations like accuracy, complexity etc. To overcome these problems, this paper proposes a heterogeneous ensemble technique that uses random forest, artificial neural network and dynamic time wrapping techniques along with weighted voting scheme to obtain the final result. The experimental results show that the weighted voting ensemble technique outperforms to all the individual classifiers with average marginal gain of 20%. Index Terms—Driving pattern; Dynamic time wrapping (DTW); Sliding window; Random forests; Accelerometer; Time series classification. I. I NTRODUCTION A recent study shows that in India, the road accidents cost around INR 3.8 lakh crores [1] and the number of deaths due to road accidents in India will be around 2,50,000 by the year 2025 [2]. It is also observed that in every 4 minutes, one person becomes the victim of road accidents in India. Every year it costs around 3% of country’s GDP. Moreover, aggressively driving may increase the fuel consumption rate by upto 255%, which also increases the amount of emission of greenhouse gases responsible for global warming [3]. By analysing a driver’s behaviour, the risk of accidents can be reduced. The smartphone’s accelerometer sensor data is mostly used to classify the behaviour as aggressive brak- ing, aggressive acceleration, aggressive left turn, aggressive right turn or non-aggressive. Dynamic time warping (DTW) [4], random forest (RF) [5], and neural network methods (DNN) [6] are individually good enough to classify the aggres- sive behaviour. DTW is a distance-based method, whereas RF and DNN are feature-based methods and the joint operation of these models may give better performance. In this research, a novel ensemble model is proposed, where the above three classifiers are first individually trained and later, the final result is calculated using weighted voting, where weights are proportional to the accuracy of a classifier when evaluated individually. For experiments, the driving behaviour dataset [6] has been used. This dataset is in the form of time series, where the data is labelled with five different types of driving behaviour: aggressive left turn, aggressive right turn, aggressive braking, aggressive acceleration, and non-aggressive. There are two ways to deal with time series data. The first way is to generate the feature vectors of a time series data to train feature based model (RF and DNN) whereas the second way is to calculate the distance between two time series using dynamic time warping (DTW). All the above mentioned keywords are discussed in proposed methodology section. The rest of the paper is organized as follows: section 2 contains the pre-existing work on driving patterns analysis. Section 3 presents the proposed work whereas section 4 contains the brief discussion of dataset used and experimental results. The last section contains conclusion and future scope. II. RELATED WORK This section includes pre-existing work related to the driving behaviour analysis using the smartphone’s sensors. Castignani et al. [7] developed a mobile application that detects accelera- tion, braking, over-speeding events using motion sensors and GPS, and generates a score for drivers using a fuzzy system that uses real time information like route topology and weather conditions. The score generation method is independent of the vehicle used. Later, Hamdy et al. [8] proposed k-nearest neighbour (KNN) and dynamic time warping (DTW) based methods. These methods can be used to identify the aggressive behaviour of a driver. The Accelerometer, GPS and gyroscope sensors are used to collect the data using a smartphone. Dynamic time warping identifies the similarity between two different time series, whereas k-NN finds the road anomaly. Later, Dai et al. [9] presented a work that detects unusual turning and abruptly changes in speed under the influence of drunk and driving. The smartphone’s accelerometer and orien- tation sensors were used to analyze the lateral and longitudinal acceleration. When the difference of maximum and minimum lateral acceleration exceeds the pre-calculated threshold value then unusual turning is detected. When the maximum and minimum value of longitudinal acceleration exceeds then abruptly changes in speed is detected. Rui et al. [10] proposed a work to detect driving patterns using vehicle sensors and Proc. EECSI 2020 - 1-2 October 2020 77