On-board GPS (BTSC)

Chapter 7

Introduction
An increase in private-vehicle
ownership is one of the primaryreasons for pollution and greenhousegas emissions. According to anarticle by the European Commission
for Sustainable Urban Mobility [ 1 ],buses emit 20% less carbon
monoxide, 10% fewer hydrocarbons,and 75% less nitrogen oxide perpassenger mile compared toautomobiles with a single occupant.
Day-by-day increasing pollution
shows a strong need to promote
mass transit. However, as per
the Singh [2], the share of public
transport in work trips is only 18.1%.
One of the key causes for such
low share is the lack of comfort.
Thus, to promote mass transit, basic
conveniences are to be provided.
Hence to enhance the comfort in thesystem, this work targets to improve
travel time prediction using a GPSdataset. As shown in Figure 7-1 (a)and (b), passenger buses aremounted with GPS devices to track
the speed, distance, elapsed time,
and the real-time location in terms oflatitude, and longitude. The dataset
used for this study is collected from

Figure 7-1 (a) GPS Data Logger; (b) Study vehicle used for data collection(a)(b)

a stretch segmented based on the
traffic interruptions at various points
in that stretch. The data is preparedby mapping the GPS coordinatesof the bus with the road junction
to understand the location of thebus in transit and calculating theactual time the bus spent at various
road segments. This information
is inputted into various regression
models such as Support Vector
Regressor (Cortes, et al. [3]), Random
Forest (Breiman [4]), Gradient Boosting(Friedman [5]) and Extreme Gradient
Boosting (Chen, et al. [6]) to makepredictions. The tracked informationis also stored in the database for
updating the model with new train
data. We implement two models,
one for the prediction of travel timeof the whole stretch second forprediction at various links on thestretch. This information can be sent
to the bus stop information display
board to notify passengers about
the current location of the bus andexpected arrival time.

Figure 7-2 Study route
IITH ParkingɈ

IITH Main road ɈɈIsnapur ɈɈɈPatancheru Ɉ9Map ©2022 Google44

BHEL X Road

1: Case Study
A study stretch of 26 km is selected
near Hyderabad city on the four-lanedivided national highway (NH-65),
which is shown in Figure 7-2. The
study section is divided into rural andsub-urban categories, which consistof 12 intersections, 13 mid-block
openings, and 4 gentle curves. The
data is collected for the passenger
buses by mounting a high-end GPS
data logger, as shown in Figure 7-1.
The instrument captures thecontinuous positional coordinates,speed, distance, acceleration,
heading, and slip angle along withthe video data at a frequency of
10 Hz. The data collection was
carried out for ﬁve weeks, ensuring
clear and dry weather. Total 92 trip
data were collected, comprising
69 travel hours and 2,116 kilometers.

2: Data preparation andPreliminary Analysis
The latitude and longitudinal
information is used to track theChapter 7
On-board GPS (BTSC)

Table 7-1 Descriptive statistics on travel time at various junction
Ⅰ(1.9 km)Time/segment

Ⅱ (10.7 km)

Ⅲ (6.2 km)

Ⅳ (7.2 km)

Mean

Std.

Mean

Std.

Mean

Std.

Mean

Std.

Morning peak hours (8:00 am to 11:00 am)

7.65

0.84

11.81

1.01

12.52

3.4

12.80

2.33

Off-peak hours (11:00 am to 5:30 pm)

5.883.49

12.01

0.69

9.11

1.72

11.35

2.03

Evening peak hours (5:30 pm to 8:30 pm)

5.24

2.65

12.93

1.37

11.39

2.28

13.22

1.85

Table 7-2 Feature description for travel time prediction

Table 7-3 Feature importance and rank

Parameter

Description

Parameter

Segment id

Each segment is assigned with a unique id

Distance

158.9%

Distance

Segment length

Prev segment_tt

215.22%

Direction

0 and 1 for opposite directions

Time

310.2%Time

Travel hours are divided into Morning/Afternoon/ Evening

Segment id

47.3%

1 for the weekend, 0 for weekday

Weekdayweekend

54.27%

Direction

63.97%

Weekday/
weekendPrev_segment_tt Travel time required for previous segment

bus over the selected route andat various junctions on the route.
To account the effect of different
traffic conditions on bus travel time,
the study stretch is divided into
segments characterized by importantjunctions on the route, namely IITH
Main Road Ⅰ( ), Isnapur (Ⅱ), Patancheru(Ⅲ), and BHEL-X-Road (Ⅳ) (Figure 7-2).
The parameters used in the models(Table 7-1) are selected based on
the travel time variations observed.
The notable effect of time of travel
can be discerned from the statistics
thus, the time of travel is considereda parameter for predicting travel
time. Travel time also varies
concerning the day of travel being
weekday or weekend. As there isno signiﬁcant trend observed on
different weekdays, a parameter
called weekday/weekend is used todifferentiate between weekdays andweekends. The direction of travelis also considered as a parameterto account the travel time variations
due to changes in traffic conditions
with respect to the direction of travel.
For link travel time, the study stretch
is segmented, and a unique ID is
assigned to each segment. Alongwith the selected parameters, thesegment ID, distance, and the timerequired to travel the previous.

Rank Importance

Model Evaluation

Conclusion

Input parameters/predictor variables
have very high importance on theaccuracy of the model. Table 7-2 andTable 7-3 shows the importance andranking of the features used as input
parameters. In the link travel time
prediction, the feature importanceof distance is evident as it is directly
proportional to travel time. However,
it is interesting to see the impact oftravel time of the previous segmenton the current segment. Other thanthese, time of travel also seemed tobe an important feature.

As mentioned in the methodology
section, ensemble methods havethe power to combine several
weak learners to form one strong
learner. Gradient Boosting andRandom Forest work based upon thisprinciple and thus are stronger thansingle models like Support Vector
Regressor. Using the principles ofGradient Boosting, XGBoost is builtwith additional custom regularization
terms, which makes it more powerful.
As per the current literature, lessamount of work has been doneusing the ensemble models for theprediction of the arrival time of buses,
especially for Indian traffic conditions.
Some literature talks about thecomparison of Random Forestand Gradient Boosting for travel
time prediction on time series data(Zhang, et al. [7], Gupta et al., [8]).
As per the mentioned studies,
Gradient Boosting and Random
Forest both performed well inpredicting travel time. However,
Gradient Boosting was able tounderstand the complex relationshipbetween the parameters giving
an overall superior performanceto Random Forest. As per the best
knowledge of the authors, Extreme

As mentioned earlier, the error
function used to evaluate theaccuracy of models is MAPE.
We also use RMSE to evaluate
the performance of models.
The comparative analysis of the four
methods discussed in earlier sections
is shown in Figure 7-3 and Figure 7-4.
Figure 7-3 shows the performanceof models in all the segments. Insegments (links)Ⅰ, Ⅱ, and Ⅳ, we canobserve a clear improvement inaccuracy using XGBoost. In segment
Ⅲ, we can observe that SVR andGB outperform RF and XGBoost,while XGBoost gives a better overall
performance, as shown in Figure 7-4.

45

Handbook of Multimodal Transport for Smart City
Application of Sensing, Networking and Big Data Analysis

Figure 7-3 Results for travel time (70%–30% train-test division)

Figure 7-4 Results for travel time prediction (10-fold cross-validation)
15.00%

30

14.50%

20
15

MAPE (%)

MAPE (%)

25

1050SVRRF
GB
XGBoost14.00%
13.50%
13.00%

I
17.72
13.524
8.16
8.01

II
10.28
12.0887.21
5.038

Gradient Boosting has not been
evaluated in the present studies
on GPS data for bus arrival timeprediction. In this study, we explored
XGBoost to model travel time on
GPS data using various parameterssuch as weekday, time of travel,road segment on which the bus isrunning, the direction of running,
and travel time of the previoussegment, etc. to implicitly learn the
traffic patterns. Incorporating thementioned parameters, the Extreme
Gradient Boosting is found to
predict signiﬁcantly better than otherbenchmark models such as Gradient
Boosting Machine, Random Forest,
and Support Vector Regression withIII
21.28924.36421.231
22.55

IV
18.88
11.261
14.53
13.58

12.50%
12.00%MAPE

XGBoostGBRFSVR

12.97%

13.96%

14.56%

14.65%

MAPE between 5.03% to 22.55% forlink travel time prediction and 7.35%
for prediction at a complete stretch.
One issue with Extreme Gradient
Boosting is related to optimizationof parameters. As discussed in
the model-optimization section,
the results given by the model
are signiﬁcantly affected by theparameters. The tradeoff between
time for training and accuracy ofthe model is to be consideredwhile selecting the parameters. To
summarize, XGBoost has potential towork considerably well in predicting
travel time on highways. In recenttimes when numerous data collection
sources are available, it is not trivial

to ﬁnd a speciﬁc model that works
well on every kind of data. However,ensemble models have capability
to combine multiple diverse models
to form a strong model. Powerfulmodel like XGBoost can prove very
inﬂuential in such cases. In this study,
the indirect parameters like weekday
and time are considered along withtime taken on previous segments toaddress spatial correlation. Exploring
the impact of temporal correlation on
prediction accuracy by considering
time series data along with spatial
correlation is the future scope of
this work.

References[ 1 ] European Court of Auditors: Sustainable Urban Mobility in the EU: No Substantial Improvement Is Possible Without
Member States’ Commitment. https://www.eca.europa.eu/Lists/ECADocuments/SR20_06/SR_Sustainable_Urban_Mobility_EN.pdf, 2020.
[ 2 ] Singh, J.: City Public Transportation Development in India. https://www.intelligenttransport.com/transport-articles/21458/
city-public-transportation-india/, Retrieved from 2016.
[ 3 ] Cortes, C., and V., Vapnik: Support Vector Machine. Machine learning, Vol. 20, No.3, pp.273–297, 1995.
[ 4 ] Breiman, L.: Random Forests. Machine learning, Vol.45, No.1, pp.5–32, 2001.
[ 5 ] Friedman, J. H.: Stochastic Gradient Boosting. Computational Statistics and Data Analysis, Vol. 38, No.4, pp.367–378, 2002.
[ 6 ] Chen, T., & C., Guestrin: XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM KDD International
Conference on Knowledge Discovery and Data Mining, pp.785–794, 2016.
[ 7 ] Zhang, Y., and A., Haghani: A Gradient Boosting Method to Improve Travel Time Prediction. Transportation Research Part
C: Emerging Technologies, Vol.58, pp.308–324, 2015.
[ 8 ] Gupta, B., S. Awasthi, R. Gupta, L. Ram, P. Kumar, B. R. Prasad, and S. Agarwal: Taxi Travel Time Prediction Using
Ensemble-based Random Forest and Gradient Boosting Model. In Advances in Big Data and Cloud Computing, Springer,Singapore, pp.63–78, 2018.

46