スマートフォン加速度データを用いた交通機関判別分析における最適な特徴量設定に関する研究 Optimum Feature Extraction Window Size for the Purpose of Travel Mode Detection using Smartphone’s Accelerometer Muhammad Awais Shafique*1,*2, Eiji Hato*2 and Hideki Yaginuma*2 1[Department of Transportation Engineering and Management, University of Engineering and Technology, Pakistan], 2[Transportation Research and Infrastructure Planning Laboratory, Department of Civil Engineering, The University of Tokyo, Japan] ABSTRACT METHODOLOGY RESULTS 加速度センサーを内蔵したスマートフォンは,所有者が利用している交通機関の自 動判別に資する可能性を持つ.このアプローチは,従来型のアンケート調査と比較 して,欠損値や誤記入を回避した正確な行動データが得られるという利点を有して おり,高精度での交通機関判別が可能となる.本研究では,8つの交通機関を対象 に加速度データを用いた判別手法を構築した.くわえて,判別精度を向上させるた めに,特徴量の最適な設定方法を検討した.具体的には,判別に利用する特徴量 について,最適なデータ抽出幅を数値実験から明らかにした.その結果,最適な特 徴量の設定範囲を適用することで,99.81%の判別精度を得ることに成功した. • Data was collected by 8 participants from Kobe city(Table 1, Figure 2). • Results (Table 2) show that the classification accuracy improved with increase in the window size. • Instead of using accelerations along the three axes, the resultant acceleration was calculated. • The other three features were calculated from the resultant acceleration values using the moving window concept. • Consequently, window size was used up till 450 and not beyond. • Window size was varied from 50 to 450 point with increments of 50. • This is because when these modes were moving at crawl speeds then their acceleration matched that of walking. • Random Forest was used to classify the data (Figure 3). Smartphones equipped with accelerometer can be utilized for automatically detecting the means of transportation used by the phone carrier. This approach has the advantage of replacing the error prone conventional method of travel data collection by survey questionnaires. In this study, travel mode prediction was done covering eight modes namely walk, bicycle, motor bike, car, taxi, bus, train and subway. During feature extraction, optimum window size was ascertained by comparing different sizes varying from 50 point to 450 point with an interval of 50 point. An overall accuracy of 99.81% was achieved by utilizing 450 point window size. • 70% of total data was randomly selected to form the learning dataset and the rest was used to test the algorithm. Extracted Features • Accelerometer, found in almost all smartphones, is used to read the acceleration of the device in three directions i.e. x, y and z. • All the modes except walk were misclassified as walk for the most part. • Therefore when the window size was stepwise increased, the unusually low accelerations were averaged over a larger range causing their effect to reduce. • Table 2: Travel mode prediction accuracies for various window sizes • Resultant Acceleration Calculated from raw data • Maximum Resultant Acceleration Calculated from resultant acceleration using moving window concept • Average Resultant Acceleration • Maximum Average Resultant Acceleration BACKGROUND • The percentage increase flattens out as the window size reaches 450 (Figure 4). • Table 1: Amount of data Accuracy (%) for window size Mode 50 100 150 200 Bicycle 77.49 91.16 95.46 97.38 Bus 85.39 94.90 97.56 Car 86.58 94.88 Motor Bike 93.59 Subway 250 300 350 400 450 98.36 98.90 99.04 99.33 99.55 98.59 99.11 99.45 99.46 99.67 99.68 97.35 98.44 99.01 99.27 99.53 99.60 99.71 97.48 98.69 99.31 99.56 99.70 99.78 99.83 99.84 75.66 91.42 95.92 97.59 98.40 98.93 99.19 99.38 99.48 Taxi 60.10 82.00 91.44 93.56 96.14 96.80 97.19 98.73 98.57 Mode Amount of data entries Train 89.31 96.22 97.97 98.79 99.26 99.44 99.60 99.67 99.76 Walk 97.06 98.83 99.35 99.60 99.75 99.82 99.86 99.90 99.91 Bicycle 132213 Total 91.78 96.91 98.40 99.06 99.40 99.58 99.69 99.76 99.81 Bus 170693 Car 536200 • The motivation behind this new approach lies in the shortcomings of the conventional travel survey methods employed all over the world for the purpose of travel data collection. Motor Bike 440073 Subway 178453 • These conventional methods are laborious, time-consuming and most importantly prone to biased-response and/or no-response attitude. Taxi 8647 Train 465000 Walk 1754063 • Recently a lot of research is being done to employ various sensor’s data, including accelerometer data, for the purpose of detecting the mode of transportation used by the phone carrier. • Automatic detection of transportation mode by sensor’s data is expected to counter these negative characteristics of the conventional methods by partially or completely substituting them. 0 • Figure 2: Origin and destination points for the studied trips • The current study aims at determining the optimum window size during feature extraction, for achieving good accuracy during travel mode detection. Moving Window • For the purpose of smoothening the data and reducing the effect of the outliers, the concept of moving window is used where a certain number of readings, defined by the window size, are used to apply an operation (e.g. average, maximum etc.) at a certain data entry level and this window moves downward as the calculations proceed along the data column (Figure 1). 100 Window size 200 300 400 500 0 Increase in accuracy (%) • This data can be used in other fields like transportation. 1 2 3 4 5 6 • CART used to grow unpruned trees. • Large number of trees grown. • Each tree uses 63% of training data randomly selected. • At each node, subset of features is randomly selected. • Among subset features, best feature is used for the split. • New data is predicted using all the trees. • Final result is taken as the mode of individual results. • Figure 4: Increase in accuracy (%) over each increment of window size CONCLUSIONS • Using smartphones for automatic travel mode detection might unlock countless new possibilities. • Apart from replacing the conventional travel surveys, it can assist in customer oriented advertisement. • This study provides a workable methodology to correctly predict eight different modes of transportation. • A comparison among various window sizes for feature extraction shows that the accuracy improves with increase in window size. • An overall accuracy of 99.81% was achieved for a window size of 450 points. • Figure 1: Example of calculation using 3-point window size • Figure 3: General procedure of Random Forest (Shafique and Hato 2014)* • With further increase in window size, the percentage increase in accuracy would be much smaller. *Shafique, Muhammad Awais, and Eiji Hato. "Use of acceleration data for transportation mode prediction." Transportation: 1-26.
© Copyright 2024 ExpyDoc