Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

2018 21st International Conference on Intelligent Transportation Systems (ITSC)

Maui, Hawaii, USA, November 4-7, 2018

Real-Time Taxi Demand Prediction


using data from the web
Ioulia Markou, Filipe Rodrigues, and Francisco C. Pereira

Abstract—In transportation, nature, economy, environment, because they can efficiently facilitate resource allocation.
and many other settings, there are multiple simultaneous Through their application, passengers are able to call or pre-
phenomena happening that are of interest to model and predict. order a taxi, even when they are located in an area where it
Over the last few years, the traffic data that we have at our
disposal have significantly increased, and we have truly entered is very hard to find a driver. This trend, therefore, proves that
the era of big data for transportation. Most existing traffic there is a tremendous need for better taxi fleet organization
flow prediction methods mainly focus on capturing recurrent and taxi distribution from a taxi center, according to the
mobility trends that relate to habitual/routine behaviour, and demand of an entire city [3].
on exploiting short-term correlations with recent observation The prediction of taxi demand is challenging because it is
patterns. However, valuable information that is often available
in the form of unstructured data is neglected when attempting correlated with many parameters of underlying information.
to improve forecasting results. Currently, the general practice is to rely on formal processes
In this paper, we explore time-series data and textual infor- and manual work. For very big events, such as the Olympic
mation combinations using machine learning techniques in games or football world cup matches, the event organizers
the context of creating a prediction model that is able to engage with operators and authorities to meet the enormous
capture in real-time future stressful situations of the studied
transportation system. Using publicly available taxi data from demand. For smaller events though, this task is labour-
New York, we empirically show that the proposed models are intensive and even with a list of events, their impact is hard
able to significantly reduce the error in the forecasts. The final to estimate. A timely and accurate notion of demand impact
mean absolute error (MAE) of our predictions is decreased by is accordingly needed in order to design adequate system
19.5% for a three months testing period and by 57% if we changes and to disseminate appropriate information to the
focus only on event periods.
public.
Index Terms—time series forecasting, taxi demand, special In this paper, we focus on the prediction of taxi trips to
events, textual data, topic modeling, machine learning.
special events’ venue areas. More specifically, we develop
a real-time model that is able to predict taxi demands
I. I NTRODUCTION
using special events data. The time window of the study
Along with the evolution of the Internet, especially the comprehends 4 years (2013-2016) and our work is focused
growth of mobile data due to more and more mobile devices on New York City (NYC). Using a large-scale public dataset
and applications, the information contributed publicly by of 1.1 billion taxi trips and event data from the Web, we
all of us keeps increasing substantially. Through popular empirically show the value of modeling textual information
websites and social platforms such as Facebook, Twitter, associated with the events, and that the proposed machine
Wikipedia, eventful.com Foursquare, etc., it is possible learning approaches are able to outperform other methods
nowadays to collect information about popular events that from the state of the art by combining information from
happened in the past as well as information for those planned different sources and formats.
for the near future. The anticipation of the consequences of The remainder of this paper is structured as follows.
popular events in the transport system will allow us to better A literature review on prediction applications and topic
prepare for such scenarios. modeling is presented next. Then, we describe our datasets
Disruptions due to special events are a well-known chal- and case study (Section 3) and present our model (Section
lenge in transport planning, since the transport system is 4). The paper ends with the conclusions (Section 5).
typically designed for habitual demand. Large events (e.g.
music concerts, sport games, political rallies) do not receive
II. L ITERATURE R EVIEW
any special treatment or attention, which often creates non-
recurring congestion and overcrowding. Taxi-calling plat- The available spatial datasets, as well as the potential
forms, such as Uber [1] and Grab [2] are becoming increas- of events information and topic modeling for transportation
ingly popular, especially in situations of traffic congestion, problems, should be taken into consideration for an accurate
demand prediction model formulation.
I. Markou, F. Rodrigues and F. Pereira is with the Department of
Management Engineering, Technical University of Denmark (DTU).
E-mail: markou@dtu.dk (I.Markou), rodr@dtu.dk (F. Rodrigues),
camara@dtu.dk (F. Pereira)

978-1-7281-0323-5/18/$31.00 ©2018 IEEE 1664


A. Prediction Applications using Taxi Data work [15], using public transport data we compared an
In urban systems, nature, economy, environment, and origin/destination (OD) prediction model with and without
many other settings, there are multiple simultaneous phe- simple information obtained from the Internet, such as event
nomena happening that are of interest to model and predict. type or whether the performer/event had a Wikipedia page.
Taxi demand prediction is one of the non-trivial research We verified that such information could reduce the root mean
subjects that attracts particular interest due to its inherent squared error (RMSE) by more than 50% in each OD. In
complexity. Taxi centers need to better organize their fleet, another study, we presented a machine learning model that
so that they can maximize their profits, as well as the classifies aggregated crowd observations into explanatory
satisfaction of their employees and customers. Therefore, a components [16]. After the identification of overcrowding
better demand prediction can be beneficial for all interested hotspots in the city-state of Singapore, we retrieved potential
parties. It should be also noted that a good prediction model explanations from several event announcements websites.
will be necessary in the future, because self-driving taxis will The internet is also a valuable source for other aspects
need to decide where to roam before picking up passengers. of mobility research. For example, Twitter has been used
Several methods have been proposed to predict taxi de- for crisis management [17], [18], urban management and
mand, including probabilistic models [4], neural networks planning [19] and the analysis of different aspects of mo-
[5] and time series modeling [6], [7]. A unified linear bility [20]. Due to the complexity of the exploration of the
regression model that outperforms other popular non-linear open Web (e.g. using Google search), the use of internet data
models in the prediction accuracy of the Unit Original Taxi in transportation, however, is currently limited to manually
Demand (UOTD) is proposed by Tong et al. [8]. A simple defined sources and highly fine-tuned processes.
model structure that eliminates the need for repeated model
C. Topic models
redesign proves to be able to behave better in prediction
scenarios with high-dimensional features. A considerable amount of important information about a
New York City has been a subject of several studies, planned event is in textual form. Adding to other structured
since its yellow and green taxi public dataset is easily information, such as date, time and location, we can find
accessible and sufficiently detailed. We [9] used kernel den- useful details concerning its content in the description, title,
sity analysis for demand fluctuations detection and analysis. comments on the website hosting the announcement. To
Significant deviations from the average day were correlated obtain an automated system, we still need to convert such
with disruptive event scenarios such as extreme weather data into a proper representation that a machine learning
conditions, public holidays, religious festivities, and parades. can understand. However, the dimensionality of the machine
Morgul and Ozbay [10] present an empirical assessment learning model will be increased beyond reasonable if we
of taxicab drivers labor supply. Yang and Gonzales [11] explicitly include the text, word by word. Natural language
identify locations and times of day where there is a mismatch is rich in synonymy and polysemy, different announcers and
between the availability of taxicabs and taxi service demand. locations may use different words, besides it is not always
Zhao et al. [12] use entropy and the temporal correlation obvious which words are more “relevant”. Topic modeling is
of human mobility to measure the demand uncertainty at the research topic that focuses on covering these weaknesses.
the building block level. They implemented three prediction The approach of topic modeling is to represent a text
algorithms to validate their maximum predictability theory. document as a finite set of topics. These topics correspond
Some other research studies used this taxicab data to explore to sets of words that tend to co-occur together rather than
taxicab drivers airport pick-up decisions [13], or travel time a single word associated with a specific topic. For example,
variability analysis [14]. a rock festival textual description could have a weight w1
assigned to topic 1 (e.g. words related to concerts in general),
w2 of topic 2 (e.g. words related to festivals), w3 of topic 3
B. Internet as a data source for special events (e.g. words related to the venue descriptions) and so on. In
Internet, and more specifically the several social network- particular, we use a specific technique that is called Latent
ing services that exist, has become a popular distribution Dirichlet Allocation (LDA). For the readers that are familiar
outlet for users looking to share their experiences and with Principal Components Analysis (PCA), there is a simple
interests on the Web. Taking as an example the Facebook, analogy: PCA re-represents a signal as a linear combination
which has over 1.86 billion monthly active Facebook users of its eigenvectors, while LDA re-represents a text as a
(Facebook MAUs) worldwide, it is clearly understood that linear combination of topics. In this way, we reduce the
the information derived from the above platforms, can un- dimensionality from the total number of different words of
deniably help discerning explanations about observed real- a text to the number of topics, typically very low. Each
world phenomena, such as non-habitual overcrowding sce- document is represented as a distribution over topics, and
narios. each topic is a distribution over words. For further details
Due to the importance of special events impact in urban concerning LDA’s generative process please refer to the
mobility, it is not surprising that they are a predominant original article of David Blei and colleagues [21].
part of transportation research. Fortunately, the Internet is In the particular domain of urban computing, Pereira et
rich in information about public special events. In an earlier al. [22] studied the problem of using event data to help

1665
predict public transport demand. Their approach consists
of using LDA to learn a topic model, and using the topic
assignments as features in a shallow neural network model.
Other recent research efforts in [23], [24] have focused on
tools dealing with event identification in real time using
micro-blog services.
While the approaches described above demonstrate the
potential of events information and topic modeling for trans-
portation problems, none of them work on a real-time basis.
The machine learning techniques proposed in this paper take
into consideration the advantage of short-term time-series
Fig. 1: Map of the two study areas.
trends and predict taxi demand having knowledge of traffic
conditions in the near past. The developed model can be used
to instantaneously inform interested parties about possible IV. D EMAND P REDICTION M ODEL
increased demand around venues and better critical fleet
Our prediction model should demonstrate the hypothesis
distribution for system requirements fulfillment.
that contextual information is significant for real-time taxi
demand prediction in the vicinity of special event venues.
III. DATA D ESCRIPTION AND P REPARATION Generalizing to other cases, and upon available event data,
In this research, we work with two major datasets: this should be valid to any area in which demand can be
events and taxi data. The latter is distributed by technol- somehow associated with available contextual information,
ogy providers of authorized under the Taxicab & Livery as for example school areas and information about school
Passenger Enhancement Programs (TPEP/LPEP) and were holidays, shopping areas and large sales, and main govern-
made publicly available by the NYC Taxi and Limousine mental buildings and public demonstrations.
Commission (TLC) [25]. We use taxi data from 1/1/2013
through 6/30/2016, which includes around 600 millions taxi A. Preliminary Analysis
trips after data filtering. The dataset specifies for each drop-
The raw dataset that we obtained from TLC [25] includes
off and pick-up event the GPS location and the time-stamp.
fields capturing pick-up and drop-off dates/times, pick-up
Based on this data, we looked at a list of the top venues and drop-off locations, trip distances, itemized fares, rate
in NYC [26] and selected the two venues for which more types, payment types, and driver-reported passenger counts.
complete event records were available online: the Barclays Within the framework of the forecasting model that we want
Center and Terminal 5. The first venue is located in the to formulate for Barclays Center and Terminal 5, the filtered
heart of Brooklyn and it is the state-of-the-art home of the taxi trip records are additionally aggregated by hour.
NBAs Brooklyn Nets and the NHLs New York Islanders. For most regions, the taxi demand is governed by a
It is one of the most popular facilities in the New York certain amount of randomness (e.g., unexpected events) and
metropolitan area because it hosts many sold-out concerts, some degree of regularity (e.g., weekly patterns), which
conventions and other sporting and entertainment events. It can be exploited for prediction. Before the configuration
is ranked top five globally in 2015 for gross revenue and of initial modeling structure, we decided to remove any
attendance by Billboard and Venues Today. On the other deterministic trends and focus our analysis on the remaining
hand, the Terminal 5 is a 3-floor venue that regularly hosts fluctuations. A simple, yet very effective way, of identifying
concerts with many different audiences and that is located in these daily or weekly recurring patterns is by constructing
the heart of Manhattan. Given the geographical coordinates a historical averages model, which computes the individual
of these two venues, we selected all the taxi pickups that averages for each (time of day, day of the week) pair based
took place within a bounding box of ±0.003 decimal degrees on historical data (from the train set only). The historical
(roughly 500 meters) to be our study areas. Figure 1 shows averages then represent a fixed recurring trend, which can
a map of these areas. be easily removed from the data.
Regarding the event data, it was extracted automatically
from the Web using either screen scraping techniques or
APIs. For the Barclays Center, the event information was B. Model Selection and Comparison
scraped from its official website, since it maintains a very Our model aims to predict the number of taxi pickups from
accurate and detailed calendar. We collected a total of 751 a given venue area, occurring at a given hour interval of a
events since its inauguration in late 2012 until June 2016. As given day by taking into consideration short-term time series
for the Terminal 5, we used the Facebook API to extract 315 trends. In other words, the proposed approach is focused on
events for a similar time period. In both cases, the event data hourly short-term predictions.
includes event’s title, date, time and description. In Table I, For its implementation we develope a linear regression
we show an example of an advertised event and its data, as (LR) model and a Gaussian process (GP) regression model
obtained from the official website of the venue. using the scikit-learn machine learning library in Python

1666
TABLE I: Event data example
Field Content
start time 12/04/2015 20:00:00
title Stevie Wonder
http://www.barclayscenter.com/events/detail/stevie-wonder-
url
songs-in-the-key-of-life-performance
Legendary singer, songwriter, musician and producer Stevie Wonder
is bringing his SONGS IN THE KEY OF LIFE PERFORMANCE tour to Barclays Center
description
on April 12. Rolling Stone declared that the show is possibly 2014s greatest testament
to the limitless potential of American music itself.

[27]. The former is chosen for its simplicity and inter- time. Making a more in-depth analysis of the gravity of the
pretability and the latter because it is flexible enough to model parameters, it was also found that:
represent a wide variety of interesting model structures. GPs • The more recent the pickup lag is, the greater is its
have shown to achieve state-of-the-art results for various significance to the final model performance.
tasks, such as travel-time prediction [28], traffic volume • The drop-off lags Dt−3 and Dt−4 appear to contribute
forecasting [29] and public transportation trips predictions more effectively than the rest of drop-off lags. This
around special event areas [30]. For models’ performance result allows us to understand that there is a strong
validation and comparison we will use the mean absolute correlation between taxi drop-offs three to four hours
error (MAE), the root mean square error (RMSE) and the before our calculated pickups; a conclusion that seems
coefficient of determination (R2 ). to be related ultimately to the average duration of an
event.
C. Model formulation
The final hourly taxi pick-ups and drop-offs will be used D. Event information
for the establishment of our first two basic models: an ele-
The selected area around Barclays Center shows signifi-
mental model with only pick-ups information; and a second
cant changes in taxi demand throughout the day. The cause of
model with both pick-up and drop-off information. For the
most of these intense fluctuations is possibly several events
initial models’ formulation and evaluation we focused on
that take place in this popular venue. The prediction model
Barclays center.
that has been configured so far is thus probably be better by
The starting point of our forecasting model is to use a 12th
introducing event information.
Order Autoregressive Model, namely Yt is regressed against
As mentioned in Section III, the events’ dataset includes
Yt−1 , Yt−2 , ..., Yt−12 , where Y represents the detrended taxi
all records’ details that could be scraped from the official
pickups count.
Barclays’ s center website; title, date, and event description.
Ŷt+1 = βˆ0 + βˆ1 Yt + ... + βˆ12 Yt−12 (1) Utilizing the above information, we choose to introduce
into our enhanced forecasting model six new parameters
where βˆ0 , βˆ1 , ..., βˆ12 are estimated using data through
that indicate the time position of each hourly pick-up count
period t. Y represents the hourly detrended pick-up count.
record in relation to the start time of an event.
The order of the autoregressive model was selected after
More specifically, our new parameters are binary identi-
a series of experiments with more or less hourly counts.
fiers that indicate if there is an event ”3 hours before”, ”2
The optimal results were obtained with the historical demand
hours before”, ”1 hour before”, ”1 hour after”, ”2 hours
information of the previous 12 hours.
after” or ”3 hours after” the current dataset instance. The
The first three years of our dataset (2013-2015) is our
start time of venue’s events and the date-time information of
model training set and the first six months of 2016 (January
each entry were used to complete the identifiers values.
2016 - June 2016) our test set. The results of this simple
The structure of the updated linear regression model is:
model formed the baseline of our analysis (see Table IV).
Subsequently, taxi drop-off counts were introduced. We Ŷt+1 = βˆ0 + β1,1
ˆ Yt + ... + β1,12
ˆ Yt−12
insert the same number of detrended drop-off counts, thus ˆ Dt + ... + β2,12
+ β2,1 ˆ Dt−12
increasing the number of model’s dependent parameters to
ˆ Event3h
+ β3,1 ˆ Event3h
+ ... + β3,6 (3)
24. bef,t af ter,t

Ŷt+1 = βˆ0 + β1,1


ˆ Yt + ... + β1,12
ˆ Yt−12 where Event3h bef,t , Event3h af ter,t represent the binary
ˆ Dt + ... + β2,12
ˆ Dt−12 variables described above.
+ β2,1 (2)
The same training and test were used for the evaluation
where D represents the detrended hourly drop-off count. and comparison of the updated model structure with the
The performance of our enriched model is significantly two previous ones (see Table IV). The improvement rate is
improved (Table IV). The R2 score has increased by almost small but important in an already well-behaved model. The
7%, thus demonstrating how important it is to introduce specific parameters allowed our model to predict demand
information about taxi arrivals at the same area, at an earlier peaks in a more accurate time position. This conclusion was

1667
obtained after visualizing the previous and updated model Therefore, each aggregated taxi record is enriched with 6∗10
results in daily plots. A characteristic example is presented new variables, where 6 is the number of the previously
in Fig. 2. The historical demand average (HA) is represented defined event identifiers. For example, if the taxi pick-up
by the blue continuous line. The hourly predictions of our count refers to 6pm and from our event dataset we know
previous model (with pickups and drop-offs information) are that there will be an event at 8pm, whose topic assignment
depicted with the green dashed line, and the new predictions, vector is [0, 0, 0.87, 0, 0.01, 0.05, 0, 0, 0.07, 0] then the 60
enhanced by adding the binary event identifiers, with the red new variables that our model is going to receive are shown
thick dashed line. It is obvious, that the updated values are in Table III.
better placed in time. We provide these apparently redundant features in the
context of experimenting with the best model representa-
E. Introduction of Topics tion and thus with our final best predictor. Through the
implementation of many tests, it was found that the optimal
In the fourth and final stage of our existing linear re- performance of the model is achieved by introducing only
gression model optimization we decided to implement a the last 30 parameters that correspond to the time period after
Latent Dirichlet Allocation (LDA) process on the events’ event’s start time, namely the identifiers “1 hour after”, “2
description. LDA assumes the following generative process: hours after” and “3 hours after”. This is probably justified
1) Draw a topic βk from βk ∼ Dirichlet(η) for k = by the fact that our model already contains information about
1...K the time window before the start of the event (by using drop-
2) For each document d: off lags) and not sufficient information for the time period
a) Draw topics proportions θd such that θd ∼ after its start time. Our model is considerably improved, and
Dirichlet(α) the updated values of MAE, RMSE, and R2 prove it (see
b) For each word wd,n : Table IV).
i) Draw topic assignment zd,n ∼
Multinomial(θd ) F. Model evaluation using only event days
ii) Draw word wd,n ∼ Multinomial(βzd,n ) To summarize, from the previous stage of our analysis,
The parameters α and η are hyperparameters that indicate four models were developed (see also Fig. 3). Each model
respectively the priors on per-document topic distribution is an enhanced version of the previous one:
and per-topic word distribution, respectively. Thus, wd,n are • The baseline model using only pick-up lags
the only observable variables, all the others are latent in this • The pick-up – drop-off model which is enriched with
mode. For a set of D documents, given the parameters α drop-off lags
and η, the joint distribution of a topic mixture θ, word-topic • The event identifier model, where six binary event
mixtures β, topics z, and a set of N words is given by: identifiers were introduced
• The topic model with additional 30 topic variables
K D
based on LDA’s results.
Y Y
p(θ, β, z, w|α, η) = p(βk |n) p(θd |a) =
k=1 d=1 We now want to test our models’ capability of predicting
N
Y taxi demand on a subset of our initial dataset, and more
= (p(zd,n |θd )p(wd,n |βk , k = zd,n )) (4) specifically on only event periods. Exploiting the parameters
n=1 of the third model, we only kept the hourly count records
Broadly speaking, the training task is to find the posterior that have at least one of their dummy variables as ”True”.
distribution of the latent variables (the per-document topic In other words, we filtered our dataset using all six event
proportions θd , the per-word topic assignments zd,n and the information attributes and we kept the records that have at
topics βk ) that maximize this probability. least one non-zero element. We then applied the same linear
The parameter that we mainly focused in this study is the regression models and the results are shown in Table V.
number of topics. We tested a range of values between 5 Our baseline model does not perform as well as previ-
and 30, and we concluded that the value of 10 yielded the ously, thus showing that pick-up lags during event periods
best model results. The other parameters, the α and η priors, cannot cover sufficiently the observed demand fluctuations.
were kept as default (1.0/(number of topics)). To confirm this Model enhancement with drop-off lags gives a remarkable
was a safe choice, we ran several iterations with different improvement of 13.4%. Knowing, therefore, the number
initial α and η priors and they generally converged to similar of taxis arriving in the area at an earlier time, model’s
outcomes. The LDA results are presented in Table II. predictions are reinforced. The dummy variables of the third
Each event record now corresponds to a unique topic model have little effect on the final result, while topics’
assignment, namely a vector of 10 values. Building on the impact is once again significant.
previous 6 binary event identifiers, and for each hourly taxi
demand count we added the topic assignment of the event G. Gaussian Processes for demand prediction
that was planned “3 hours before”, “2 hours before”, “1 hour Besides these baselines, the proposed approach is further
before”, “1 hour after”, “2 hours after” or “3 hours after”. compared with another popular method from the state of the

1668
Fig. 2: Prediction results for an event day using only taxi data (green line) and event information (red thicker line)

TABLE II: LDA Results


Topic No. Events with θd > 0.8 Popular Words
Topic 1 24 ice, disney, present, magic, new
Topic 2 72 basketball, championship, atlantic, game, tournament
Topic 3 10 show, artist, box, office, special
Topic 4 32 music, atlantic, championship, basketball, game
Topic 5 22 game, marriot, corporate, bridge, hotel
Topic 6 10 train, service, islander, view, time
Topic 7 34 tour, album, show, meet, up
Topic 8 12 circus, family, out, space, earth
Topic 9 12 dinner, reservation, jay, menu, restaurant
Topic 10 42 champion, game, group, boxing, hoop

TABLE III: Example of topic modeling introduction


Event identifier Value [0 or 1] Topic Variables Assignment
3 hours before 0 [0,0,0,0,0,0,0,0,0,0]
2 hours before 0 [0,0,0,0,0,0,0,0,0,0]
1 hour before 0 [0,0,0,0,0,0,0,0,0,0
1 hour after 0 [0,0,0,0,0,0,0,0,0,0]
2 hours after 1 [0,0,0.87,0,0.01,0.05,0,0,0.07,0]
3 hours after 1 [0,0,0.87,0,0.01,0.05,0,0,0.07,0]

TABLE IV: Linear Regression Results - 6 Months Period


Input Data MAE RMSE R2
Pick-up Lags 9.733 19.073 0.750
Pick-up & Drop-off Lags 8.772 16.298 0.817 Fig. 3: Proposed models
Pick-up & Drop-off Lags &
8.689 16.024 0.823
Event info
Pick-up & Drop-off Lags &
8.301 14.932 0.847 GPs implementation is a computational demanding process,
Event info & Topics
the training set consists of 6 months of observations (January
TABLE V: Linear Regression Results - Event Period - June 2015), the validation set contains the first two months
Input Data MAE RMSE R2
of 2016 (January-February) and the remaining four months
Pick-up Lags 19.672 32.017 0.563 of the first half of 2016 were used for testing the different
Pick-up & Drop-off Lags 16.640 26.663 0.697 approaches. The training set was chosen to correspond to
Pick-up & Drop-off Lags & the same time period of 2015, in order to ensure that our
16.511 26.259 0.706
Event info
Pick-up & Drop-off Lags &
model is trained from respective travel patterns associated
14.557 22.395 0.786 with the season. The hyper-parameters of GP, namely the
Event info & Topics
length-scale parameter of the Radial-basis function (RBF)
kernel that was chosen, and the Tikhonov regularization of
art for time-series forecasting, the Gaussian processes (GPs). the assumed covariance between the training points (alpha),
We created separate training, validation and test sets. Since were tuned based on their performance on the validation set.

1669
An exhaustive search procedure of all possible combinations demand. Taxi demand is correlated with many parameters of
within a predefined set of possible value parameters was underlying information and currently, most taxi centers rely
used. on formal processes and manual work for a fleet organization
Along with GP implementation, the corresponding fore- and taxi distribution. Even the more advanced new services,
casts were made using also linear regression models. Both like Uber or Lyft, still face great challenges in terms of
machine learning techniques use the same time intervals for demand prediction (shown by price surges and variations
training and testing. Additionally, more experiments were thereof). Our results show that by making use of event
implemented using Terminal 5’s datasets. The final results information from the Web, the proposed regression models
are presented in Table VI and Table VII. are able to improve the quality of their predictions quite
There are several very interesting aspects that are worth dramatically, thus significantly outperforming other popular
discussing. From the first three models, it is concluded that time-series forecasting methods from the state of the art
the performance of LR and GPs is similar. A remarkable that do not account for event information. The proposed
change appears though with the introduction of topics. For approaches make use of the topic modeling advantages that
Barclays center both methodologies are improved, something allow the introduction of useful details concerning events’
that does not seem to be confirmed for Terminal 5. More description in our machine learning model and from our
specifically, for the first venue the LR with topics gives a empirical results the need for accounting events’ effect when
final R2 of 0.829, and an improvement of 1.5%, while for the modeling mobility demand is highlighted.
second venue the final R2 is 0.843, with a deterioration of In future work, we aim at exploring multi-step ahead
0.5%. On the other hand, the GPs seem to respond positively predictions using the proposed machine learning techniques.
to all imported parameters. With the introduction of topics, The development of a city-wide spatio-temporal model that
the R2 is increased by 3% for Barclays Center and by 4.4% accounts for information about all the events that take place
for Terminal 5. The GP model emerges as the ideal technique across the city could be a generalization potential of this
for our real-time forecasting model. methodology.
The same comparison is implemented using the event
periods. Table VIII and Table IX summarize the final results. R EFERENCES
GPs proves to be the best performing approach for our
[1] Wikipedia, “Uber (company),” https://en.wikipedia.org/wiki/Uber
predictions. By using topics, the proposed forecasting model (company)/, 2018, [Online; accessed 20-March-2018].
significantly reduce the prediction error for both venues. [2] ——, “Grab (application),” https://en.wikipedia.org/wiki/Grab
These results clearly highlight how crucial data fusion of (application)/, 2018, [Online; accessed 20-March-2018].
[3] J. W. Chan, V. L. Chang, W. K. Lau, L. K. Law, and C. J. Lei, “Taxi
time-series data and textual information can be, in particular app market analysis in hong kong,” Journal of Economics, Business
for the problem of predicting taxi demand in event areas and Management, vol. 4, no. 3, 2016.
considered in this paper. [4] J. Yuan, Y. Zheng, L. Zhang, X. Xie, and G. Sun, “Where to find my
next passenger,” in Proceedings of the 13th Int, Conf. on Ubiquitous
Lastly, from the perspective of transportation practitioners, computing. ACM, 2011, pp. 109–118.
it is important to note that by exploiting event information [5] J. Xu, R. Rahmatizadeh, L. Bölöni, and D. Turgut, “Real-time pre-
automatically extracted from the Web and by developing diction of taxi demand using recurrent neural networks,” IEEE T-ITS,
2017.
two regression models for combining this information with [6] N. Davis, G. Raina, and K. Jagannathan, “A multi-level clustering
historical time-series data, we were able to reduce prediction approach for forecasting taxi travel demand,” in ITSC, 2016. IEEE,
error in event areas quite dramatically in both study areas. 2016, pp. 223–228.
In the case of the Barclays Center area, we started with [7] L. Moreira-Matias, J. Gama, M. Ferreira, J. Mendes-Moreira, and
L. Damas, “Predicting taxi–passenger demand using streaming data,”
an initial MAE of 18,98 using pick-up lags and we were IEEE T-ITS, vol. 14, no. 3, pp. 1393–1402, 2013.
able to obtain a MAE of 11.87 by using the full GP model. [8] Y. Tong, Y. Chen, Z. Zhou, L. Chen, J. Wang, Q. Yang, J. Ye, and
Likewise, in the case of the Terminal 5 area, we started with W. Lv, “The simpler the better: a unified approach to predicting
original taxi demands based on large-scale online platforms,” in
a MAE of 23 using pick-up lags and reached a MAE of 11.84 Proceedings of the 23rd ACM SIGKDD Intern. Conf. on Knowledge
for the full model. These are very significant improvements Discovery and Data Mining. ACM, 2017, pp. 1653–1662.
that emphasize the importance of accounting for the effect of [9] I. Markou, F. Rodrigues, and F. C. Pereira, “Use of taxi-trip data
in analysis of demand patterns for detection and explanation of
special events when forecasting mobility demand in dynamic anomalies,” TRR: Journal of the Transportation Research Board, no.
and lively urban areas. 2643, pp. 129–138, 2017.
[10] E. F. Morgul and K. Ozbay, “Revisiting labor supply of new york city
taxi drivers: Empirical evidence from large-scale taxi data,” in TRB
V. C ONCLUSION 94th Annual Meeting, no. 15-3331, 2015.
[11] C. Yang and E. J. Gonzales, “Modeling taxi demand and supply in new
We demonstrated that using online information, we can york city using large-scale taxi gps data,” in Seeing Cities Through
improve the quality of taxi demand prediction even in scenar- Big Data. Springer, 2017, pp. 405–425.
[12] K. Zhao, D. Khryashchev, J. Freire, C. Silva, and H. Vo, “Predicting
ios where the transport system is under stress. We combined taxi demand at high spatial resolution: Approaching the limit of
information extracted from the web with time-series data to predictability,” in 2016 IEEE Intern. Conf. on Big Data. IEEE, 2016,
build a predictive model of taxi demand around special event pp. 833–842.
[13] M. A. Yazici, C. Kamga, and A. Singhal, “A big data driven model
venue areas. This is typically a challenging case for transport for taxi drivers’ airport pick-up decisions in new york city,” in 2013
planning since special events originate high variance in IEEE Intern. Conf. on Big Data. IEEE, 2013, pp. 37–44.

1670
TABLE VI: LR and GP Comparison - 3 months period - Barclays Center
Linear Regression Gaussian Processes
Input Data MAE RMSE R2 MAE RMSE R2
Pick-up Lags 9.523 18.733 0.756 9.522 18.675 0.757
Pick-up & Drop-off Lags 8.620 16.280 0.815 8.669 16.378 0.813
Pick-up & Drop-off Lags &
8,577 16.369 0.813 8.571 16.396 0.813
Event info
Pick-up & Drop-off Lags &
8.258 15.656 0.829 8.100 14.979 0.844
Event info & Topics

TABLE VII: LR and GP Comparison - 3 months period - Terminal 5


Linear Regression Gaussian Processes
Input Data MAE RMSE R2 MAE RMSE R2
Pick-up Lags 10.606 19.215 0.750 10.771 18.905 0.758
Pick-up & Drop-off Lags 8.928 15.409 0.840 9.095 15.452 0.839
Pick-up & Drop-off Lags &
8.828 14.969 0.849 9.070 15.380 0.840
Event info
Pick-up & Drop-off Lags &
8.935 15.254 0.843 8.206 13.095 0.848
Event info & Topics

TABLE VIII: LR and GP Comparison - Events’ period - Barclays Center


Linear Regression Gaussian Processes
Input Data MAE RMSE R2 MAE RMSE R2
Pick-up Lags 18.104 28.985 0.568 18.980 30.427 0.524
Pick-up & Drop-off Lags 15.630 25.242 0.672 15.392 25.362 0.669
Pick-up & Drop-off Lags &
15.784 25.504 0.665 15.263 25.166 0.674
Event info
Pick-up & Drop-off Lags &
13.715 22.347 0.743 11.873 18.261 0.828
Event info & Topics

TABLE IX: LR and GP Comparison - Events’ period -Terminal 5


Linear Regression Gaussian Processes
Input Data MAE RMSE R2 MAE RMSE R2
Pick-up Lags 19.903 30.551 0.415 23.000 35.164 0.225
Pick-up & Drop-off Lags 18.004 26.253 0.568 15.716 23.254 0.661
Pick-up & Drop-off Lags &
17.231 25.450 0.594 15.440 22.943 0.670
Event info
Pick-up & Drop-off Lags &
17.934 26.535 0.558 11.839 16.903 0.821
Event info & Topics

[14] C. Kamga and M. A. Yazıcı, “Temporal and weather related variation 288, 2015.
patterns of urban travel time: Considerations and caveats for value [23] K. Kireyev, L. Palen, and K. Anderson, “Applications of topics models
of travel time, value of variability, and mode choice studies,” TR-C: to analysis of disaster-related twitter data,” in NIPS Workshop on
Emerging Technologies, vol. 45, pp. 4–16, 2014. Applications for Topic Models, vol. 1. Canada: Whistler, 2009.
[15] F. C. Pereira, F. Rodrigues, and M. Ben-Akiva, “Internet as a sensor: [24] D. Ramage, S. T. Dumais, and D. J. Liebling, “Characterizing mi-
a case study with special events,” Tech. Rep., 2012. croblogs with topic models.” ICWSM, vol. 10, pp. 1–1, 2010.
[16] F. C. Pereira, F. Rodrigues, E. Polisciuc, and M. Ben-Akiva, “Why [25] “TLC Trip Record Data,” http://www.nyc.gov/html/tlc/html/about/
so many people? explaining nonhabitual transport overcrowding with trip record data.shtml, 2018, [Online; accessed 20-March-2018].
internet data,” IEEE T-ITS, vol. 16, no. 3, pp. 1370–1379, 2015. [26] “Best concert venues in NYC,” https://www.nyc.com/nyc-guides/best
[17] D. Thom, H. Bosch, S. Koch, M. Wörner, and T. Ertl, “Spatiotemporal concert venues in nyc.308/, 2017, [Online; accessed Aug-2017].
anomaly detection through visual analysis of geolocated twitter mes- [27] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion,
sages,” in Pacific visualization symposium (PacificVis), 2012 IEEE. O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Van-
IEEE, 2012, pp. 41–48. derplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and
[18] T. Sakaki, M. Okazaki, and Y. Matsuo, “Earthquake shakes twitter E. Duchesnay, “Scikit-learn: Machine learning in Python,” Journal
users: real-time event detection by social sensors,” in Proceedings of of Machine Learning Research, vol. 12, pp. 2825–2830, 2011.
the 19th int. conf. on World wide web. ACM, 2010, pp. 851–860. [28] T. Idé and S. Kato, “Travel-time prediction using gaussian process
regression: A trajectory-based approach,” in Proceedings of the 2009
[19] V. Frias-Martinez, V. Soto, H. Hohwald, and E. Frias-Martinez, “Char-
SIAM Intern. Conf. on Data Mining. SIAM, 2009, pp. 1185–1196.
acterizing urban landscapes using geolocated tweets,” in PASSAT,
[29] Y. Xie, K. Zhao, Y. Sun, and D. Chen, “Gaussian processes for short-
2012 International Conference on on Social Computing (SocialCom).
term traffic volume forecasting,” TRR: Journal of the Transportation
IEEE, 2012, pp. 239–248.
Research Board, no. 2165, pp. 69–78, 2010.
[20] Z. Cheng, J. Caverlee, K. Lee, and D. Z. Sui, “Exploring millions of [30] F. Rodrigues, S. Borysov, B. Ribeiro, and F. Pereira, “A bayesian addi-
footprints in location sharing services.” ICWSM, vol. 2011, pp. 81–88, tive model for understanding public transport usage in special events,”
2011. IEEE transactions on pattern analysis and machine intelligence, 2016.
[21] D. M. Blei, A. Y. Ng, and M. I. Jordan, “Latent dirichlet allocation,”
Machine Learning research, vol. 3, no. Jan, pp. 993–1022, 2003.
[22] F. C. Pereira, F. Rodrigues, and M. Ben-Akiva, “Using data from the
web to predict public transport arrivals under special events scenarios,”
Journal of Intelligent Transportation Systems, vol. 19, no. 3, pp. 273–

1671

You might also like