<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Improved Trip Planning by Learning from Travelers' Choices</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Boris Chidlovskii</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Figure 1. Trip planners of Nancy (left) and Adelaide</institution>
          ,
          <addr-line>right</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Nancy</institution>
          ,
          <addr-line>France and Adelaide</addr-line>
          ,
          <country>Australia show a</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Xerox Research Center Europe</institution>
          ,
          <addr-line>6 chemin Maupertuis,38240 Meylan</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2015</year>
      </pub-date>
      <fpage>2</fpage>
      <lpage>11</lpage>
      <abstract>
        <p>We analyze the work of urban trip planners and the relevance of trips they recommend upon user queries. We propose to improve the planner recommendations by learning from choices made by travelers who use the transportation network on the daily basis. We analyze individual travelers' trips and convert them into pair-wise preferences for traveling from a given origin to a destination at a given time point. To address the sparse and noisy character of raw trip data, we model passenger preferences with a number of smoothed time-dependent latent variables, which are used to learn a ranking function for trips. This function can be used to re-rank the top planner's recommendations. Results of tests for cities of considerable increase of the recommendation relevance.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Most cities and agglomerations around the world propose
their trip planners, in the form of a web or mobile
application. Upon a user travel request, they recommend trips
using a static library of roads and public transportation
network and services. Although these planners are
increasingly reliable in their knowledge of transportation network
and available services, they all share the same static-world
assumptions. In particular, they make a general assumption
of constancy and universality (Letchner et al., 2006), that
the optimal trip is independent of the time of day of the
actual journey and of the passengers’ preferences.
In reality, constancy and universality rarely hold. Most
urban travelers can verify that the best trip between work
and home at midnight is not necessarily the best choice to
make between the same locations at 8am. Similarly,
different passengers may choose different ways to travel between
Proceedings of the 2 nd International Workshop on Mining Urban
authors. Copying permitted for private and academic purposes.
the same origin and destination points.</p>
      <p>While the personal knowledge plays an important role, in
many cases passengers simply have different preferences
about the trip planning. For example, one passenger may
avoid multiple changes, by extending the duration of her
journey by a few minutes, while another passenger simply
wants to arrive as quickly as possible to the destination.
When a user queries a planner for a journey from origin o
to destination d starting at time ts, there are often a large
number of trips satisfying the query. Planners are designed
to provide the k-top recommendations according to a set
of predefined criteria, such as the minimal transfer time,
the minimal number of changes, etc.. Their work is
similar to any information retrieval system, where the goal is
to place the most relevant documents among the k-top
answers. Therefore, it is highly desirable that a trip planner
behaves intelligently and suggests k-top trips which reflect
the real passengers’ preferences.</p>
      <p>In this paper we closely analyze the cases of divergence
between the planner recommendations and real choices made
by urban travelers. We collect two sets of individual trips
extracted from fare collection systems in cities of Nancy,
France and Adelaide, Australia (see Figure 1). We
compare these data to the city planners’ recommendations; and
in the of case of divergence, we propose a novel method to
rank the trips that better reflects the reality.
Our method relies on two main contributions. First, we
consider any individual trip as a set of explicit preferences
made by the traveler during the trip.</p>
      <sec id="sec-1-1">
        <title>We use this set of pairwise preferences to learn a ranking function of trips.</title>
        <p>This function is then used on the top of the trip planner,
to re-rank the k-top recommendations. Second, we model
passenger preferences of choosing a specific service or a
change point in a way that reflects their dynamic nature. To
address the sparse and noisy character of the raw trip, we
model the user preferences by a set of dynamic latent
variables. We estimate these variables by a smoothed dynamic
non-negative factorization of service and transit counts.
The remainder of this paper is organized as follows. In
Section 2 we briefly review the state of art in urban trip
planning. Section 3 introduces the trip ranking problem
by analyzing individual trips for Nancy city case.
Learning to rank for trip planning is presented in Section 4.
Then Section 5 proposes to model user preferences by
dynamic latent variables and develop an estimation method
by smoothed dynamic non-negative factorization of service
and transit counts. In Section 6, we report results of
evaluation on trip re-ranking for two city datasets. Section 7
concludes the paper.</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>2. Prior Art</title>
      <p>Trip planners. Public transport (PT) trip planners are
designed to provide information about available journeys in
the transport system. The application prompts a user to
input an origin o, a destination d and a departure time ts (or
arrival time tf ), it then deploys a trip planning engine to
find a sequence of available PT services from o to d
starting at time ts (or ending at time tf ).</p>
      <p>Trip planners often retrieve multiple trips for a user query.
They typically use a variation of the time-dependent
shortest path algorithm to search a graph of nodes (representing
access points to the network) and edges (representing
possible journeys between points) (Casey et al., 2014).
Different weightings such as distance, cost or accessibility are
often associated with each edge and node. Search may be
optimized on different criteria, for example, the fastest, least
changes or cheapest ones (Pelletier et al., 2009).
Planning high quality realistic trips remains difficult for
several reasons (McGinty &amp; Smyth, 2000). First,
available General Transit Feed Specification (GTFS) sources
rarely contain all information useful for constructing
realistic plans. Second, the notion of ”service quality” is
difficult to define and is likely to change from person to person.
Consequently, in real-world trip planning, the shortest trip
is rarely the best one for a given user.</p>
      <p>Multiple efforts have been made to improve the trip
planning (Lathia &amp; Capra, 2011; Liebig et al., 2014; Mokhtari
et al., 2009; Trepanier et al., 2005; Yuan et al., 2011).
Analysis of trip planner log files (Trepanier et al., 2005) can help
improve transit service by providing better knowledge on
transit users. Log files were useful for identifying new
locations to be assessed for better understanding user
behaviors, and for guiding updates of the PT information system.
Personalization of trip planning took into account user
preferences and tries to identify the best trips among a set of
possible answers. In (Mokhtari et al., 2009), the fuzzy set
theory was used to model complex user preferences. A
typology of preferences was proposed to explicitly express
the preferences and integrate them in a query language.
Trip personalization by mining public transport data has
been addressed in (Lathia &amp; Capra, 2011). It established a
relation between urban mobility and fare purchasing habits
in London public transport network (Seaborn et al., 2010),
and proposed personalized ticket recommendations based
on the estimated future travel patterns and matching
travelers to the best fare.</p>
      <p>Integrating real time information in trip planners has been
another research trend. (Yuan et al., 2011) presented a
cloud-based system computing customized and practically
fast driving routes for an end user using (historical and
realtime) traffic conditions and driver behavior. GPS-equipped
taxicabs are used as mobile sensors constantly probing the
traffic rhythm of a city and taxi drivers’ intelligence in
choosing driving directions. The real time trip planning has
also been extended to multi-modality (Casey et al., 2014;
Seaborn et al., 2010). It used data from GPS-enabled
vehicles to produce more accurate plans in terms of time and
transit vehicles.It incorporates the delays into the transit
network at real-time to minimize the gap with respect to
the prediction model.</p>
      <p>Learning to Rank. In document retrieval, to ranking
documents based on their degrees of relevance to a query has
been the key question for decades. Much effort has been
placed on developing document ranking functions. Early
methods used a small number of document features (e.g.,
term frequency, inversed document frequency, and
document length), with an empirical tuning of the ranking
function parameters.</p>
      <sec id="sec-2-1">
        <title>To avoid the manual tuning, the document retrieval was proposed to be regarded as learning to rank (Burges et al., 2005; 2006; Cao et al., 2006; Liu, 2011).</title>
        <p>Click-through data are used to deduce pair-wise
training data for learning ranking functions.</p>
        <p>In learning to rank, a number of categories are given and a
total order is assumed to exist over the categories. Labeled
instances are provided, and each instance is represented by
a feature vector, and each label denotes a rank. Existing
methods can be categorized as point-wise, pair-wise and
list-wise (Liu, 2011). In point-wise methods, each instance
with its rank is used as an independent training example.
The goal of learning is to correctly map instances into
intervals. In pair-wise methods, each instance pair is used as
a training example and the goal of training is to correctly
find the differences between ranks of instance pairs, and
ranking is transformed into pairwise classification or
pairwise regression (Herbrich et al., 2000). This model
formalizes learning to rank as learning for classification on pairs
of instances and can deploy any classification method. In
list-wise methods, the loss function is defined on a ranked
list with respect to a query (Xia et al., 2008).</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Individual trips analysis</title>
      <p>We consider a public transportation system that offers a
number of services (buses, trams, trains, etc.) to urban
travelers. Any individual passenger trip J represents a
sequence of PT services and changes between the services.
Service legs of J form a sequence SJ = {l1, . . . , ln}, n ≥
1, where leg li is a tuple (si, bi, ai, tib, tia), si is a service
identifier (a bus number, for ex.); bi and ai are boarding
and alighting stops, tib and tia are boarding and alighting
timestamps. Trip is direct if n = 1, and transit otherwise.
li+1, as ci = (ai, bi+1, tia, tib+1).</p>
      <p>A transit trip includes n − 1 changes which refer to
waiting and/or walking between the services. The sequence of
changes is defined as CJ = {c1, . . . , cn−1}, n ≥ 1, where
ci is uniquely defined by two successive service legs li and
We make the following association between individual trips
and trip recommendations. We consider a trip J as an
explicit answer to an implicit travel query Q = (o = b1, d =
en, ts = tb1) or Q = (o = b1, d = an, tf = tan).
assumed by the planners.</p>
      <p>Trip datasets expose a very large variety of paths for any
(o,d) pair; the maximum number of different paths
observed is 46 for Nancy and 37 for Adelaide; the average
number of paths between two locations is 2.71 and 3.12,
respectively. We measure the uncertainty of choosing one
or another path from an origin o to a destination d, by using
the Kullback-Leibler divergence KL(q||p) of the trip
distribution q from the uniform distribution p. The higher KL
values indicate the higher certainty and a clear domination
of one trip over others. Figure 2.b plots the KL divergence
values for all (o,d) pairs in Nancy using the log-log scale.
Again, the high density zone suggests that a large part of
(o,d) pairs is dominated not by one but by 2 to 5 different
paths of high frequency.
b) The travel time and trip count distributions for top 5 trips.
It is important to recall that travelling preferences change
during the day. Figure 3.a shows 5-top transit trips for an
example (o, d) location pair in Nancy. Figure 3.b shows the
travel time and average trip counts for 5-top trips for this
example. All 5 trips are transit ones with one change. The
figure reveals how the user preferences vary during the day.
The trip planner recommends the trip shown in red for the
fastest trip query. First, this recommended trip is not the
fastest nor the most frequent one. Second, the trip shown
in green is the most frequent during the lunch, despite it is
far from being fast.</p>
      <p>Figure 4 gives a more general picture. It shows 240 most
frequent (o,d) pairs in Nancy. For each pair, Figure 4.a uses
the different colors to show changing user preferences. The
most frequent trip is colored in dark blue. Second, third,
forth and fifth preferences are shown in blue, green, orange
and brown colors, respectively. Trips are sorted by the
distance between the origin and destination (see Figure 4.b).
Short trips expose a higher variability than longer ones. As
the figure shows, the second choices are more visible (blue
color) during the morning rush hours. Figure 4.c shows
the trip planner recommendations for the same pairs. The
recommendations are static and do not reflect the user
preferences.
pairs in Nancy. b) Trip distances. c) Trip recommendations by the
planner.</p>
      <p>We conclude this section by Figure 5 which shows how the
user preferences vary between the PT services. It presents
the total passenger counts for all Nancy change points, at
8am, 1pm and 6pm.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Learning to rank trips</title>
      <p>When a passenger travels from an origin o to a destination
d at time ts, she implicitly prefers the trip J she takes to
all other trips J ′, J ′ 6= J . Our approach is to transform
this implicit feedback into an explicit set of pair-wise trip
preferences and to learn the ranking function f from them.
Algorithm 1 below uses the trip planner and a set T of
individual passengers’ trips. For any trip J ∈ T matching the
query Q = (o, d, ts), the algorithm retrieves the k-top
candidates for Q and retains that J has been preferred to any of
these candidates, except J itself if it happens to be in this
set. Real trip J matches a recommended trip J ′, if it has
the same number of legs and following the same sequence
of services. If SJ = {l1, . . . , ln} and SJ ′ = {l1′, . . . , ln′},
then J matches J ′ iff si = s′i ∧ bi = b′i ∧ ai = a′i, for all
i = 1, . . . , n.</p>
      <sec id="sec-4-1">
        <title>Algorithm 1 Rank learning algorithm.</title>
        <p>Require: Collection T of passenger trips J = (S, C)
Require: Trip planner P with k-top recommendations
1: S = ∅ ; set of pairwise preferences</p>
      </sec>
      <sec id="sec-4-2">
        <title>2: for each J ∈ T do</title>
        <p>Form a query Q = (o = b1, d = an, ts = tb1)
Query the planner P with query Q
3:
4:
5:
6:
7:
8:
9: end for</p>
        <sec id="sec-4-2-1">
          <title>Ensure: f</title>
        </sec>
      </sec>
      <sec id="sec-4-3">
        <title>Retrieve k-top trips as a list L</title>
        <p>for each J ′ ∈ L, J ′ 6= J</p>
        <p>do</p>
        <p>Add (Q, x(J ) ≻ x(J ′)) to S
end for
10: Learn the ranking model f from S</p>
        <p>Once the ranking function f is learned, it can be used to
improve the relevance of trip planner recommendations
acording to the re-ranking scenario. The trip planner does not
change the way it works. And for a new user query Q,
the trip planner first generates k-top candidate trips. Then
these candidates are re-ranking using the function f .
To learn a ranking function f , Algorithm 1 requires every
trip J be described by a feature vector x(J ). In the
following sections, we first describe a method for learning the
ranking function f and then how to extract relevant and
dynamic features from individual trips.</p>
        <sec id="sec-4-3-1">
          <title>4.1. Gradient Boosting Rank</title>
          <p>We used individual trips to form a set pairwise preferences,
a ranking function f can be learned from. For each
individual trip J</p>
          <p>∈ T , we generate a set of labeled data
(xi,1, yi,1), . . . , (xi,mi , yi,mi ), i = 1, . . . , |T |, which are
preference pairs of feature vectors. If xi,j has a higher
rank than x</p>
          <p>i,k (yi,j &gt; yi,k), then xi,j ≻ xi,k is a
preference pair, which means that x
i,j is ahead of x</p>
          <p>i,k. The
preference pairs can be viewed as instances and labels in a
new classification problem, where xi,j ≻ xi,k is a positive
instance.</p>
          <p>Any classification method can be used to train a classifier
f (x) which is then used for ranking. Trips are assigned
scores by f (x) and sorted by the scores. Learning a good
ranking model is realized by training of a model for
pairwise classification. The loss function in learning is pairwise
because it is defined on a pair of feature vectors.</p>
          <p>The pairwise approach is adopted in many methods,
including Ranking SVM (Herbrich et al., 2000), RankBoost
(Freund et al., 2003), RankNet (Burges et al., 2005), IR
SVM (Tsai et al., 2007), GBRank (Zheng et al., 2007),
LambdaRank (Burges et al., 2006), and others. In the
following we adopt GBRank as one of popular pairwise
methods currently used.</p>
          <p>GBRank
{xi1, xi2}, xi1
≻</p>
          <p>xi2, i =
metric pairwise loss function
takes preference
pairs as training</p>
          <p>data,
1, . . . , N . and uses the
para− max{0, f (xi2) − f (xi1) + τ }, max{0, f (xi2) − f (xi1) + τ },change observations, As = {li|li ∈ SJ , J
∈ T } and
We split all trips J ∈ T in two collections of service and
plicit factors which influence the passenger choice.
Passengers make their choices in the function of location and
time.</p>
          <p>We mention two groups of trip features. First, global
features describe the whole trip; they are the travel time, the
number of changes, the usage of specific types of transport
(bus, train, tram, etc.), multi-modality, etc. Second, much
more relevant and specific are local features that describe
each service leg and change that compose a given trip. For
each PT service, we may extract the estimated means and
variance of the speed when using this line at this time
period, the average delay with respect to the schedule. For
each change point, we can estimate the walking distance if
any, the closeness to a commercial zone or transportation
hub, etc.</p>
          <p>Unfortunately, raw features of services and change counts
are generally sparse, noisy and prone to many errors. Main
reasons for errors are due to incorrect setup of ticket
validation machines, lack of alignment between ticket validation
machines and GPS localization, and card misuse by
travelers.</p>
          <p>So we intend to extract such latent features from sparse and
noisy counts that be able to represent user preferences and
their dynamic character.</p>
          <p>Ac = {ci|ci ∈ CJ , J ∈ T }. In the following we
assume for brevity working with a set of observations A; it
may indicate service or change observations, or their sum.</p>
          <p>If we split all observations in A in T time periods,
so we obtain a sequence of count matrices At, t
1, . . . , T, A
t ∈ R+p×p at time period t, where aij is the
=
service or change count during the period t. and p is the
number of stops.</p>
          <p>The full diagram of latent feature extraction for individual
trips and learning the ranking function is given in Figure 6.</p>
        </sec>
        <sec id="sec-4-3-2">
          <title>5.1. Collapsed matrices</title>
          <p>vations from A are collapsed in one matrix A.</p>
          <p>We first consider the static case when T is 1 and all
obserBoth service and change data are sparse non-negative
counts, and we can use the non-negative matrix
factorization (NNMF) as a method giving a great low-rank
robust interpretation of data (Lee &amp; Seung, 2001). They can
be efficiently computed by formulating the penalized
optimization problem and using modern gradient-descent
algorithms (Hoyer, 2004).</p>
          <p>Matrix A is approximated with a product ot two low-rank
matrices that is estimated through the following
minimizaN
1
2 i=1
L(f ) =</p>
          <p>X(max{0, τ − (f (xi1) − f (xi2)})2,
where f (x) is the ranking function and τ is a parameter,
0 &lt; τ ≤ 1. The loss is 0 if f (xi1) is larger than f (xi2) + τ ,
otherwise, the incurred loss is 12 (f (xi2) − f (xi1) + τ )2.
To optimize the loss function with respect to the training
instances, the Functional Gradient Decent is deployed.
Treating all f (xi1), f (xi2), i = 1, . . . , N as variables; the
gradient of L(f ) is computed with respect to the training
instances as follows</p>
          <p>If f (xi1) − f (xi2) ≥ τ , the corresponding loss is zero, and
there is no need to change the ranking function. If f (xi1) −
f (xi2) &lt; τ , the loss is non-zero, and the ranking function
is updated using the Gradient Descent:</p>
          <p>fk(x) = fk−1(x) − νΔL(fk(x)),
where fk(x) and fk−1(x) denote the values of f (x) at k-th
and (k − 1)-th iterations, respectively, ν is the learning rate.
At the k-th iteration of the learning, GBRank collects
all the pairs</p>
          <p>with non-zero losses {(xi1, fk−1(x12) +
τ ), (xi2, fk−1(xi1) − τ )} and employs Gradient Boosting
Tree (Friedman, 2000) to learn a regression model gk(x)
that can make prediction on the regression data.
learned model gk(x) is then linearly combined with the
existing model fk−1(x) to create a new model fk(x) as
The
follows
fk(x) =
kfk−1(x) + βkgk(x)
k + 1
,
with βk as a shrinkage factor (Zheng et al., 2007).</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Trip feature extraction</title>
      <p>We now describe each real trip J by a set of relevant and
dynamic features x(J ). There may exist explicit and
imRk
where U and V are n × K non-negative matrices. The
rank or dimension of the approximation K corresponds to
the number of latent factors; it is chosen to obtain a good
data fit and interpretability, where U give latent factors for
origin stops and V does for destination stops.</p>
      <p>The factorized matrices are obtained by minimizing an
objective function that consists of a goodness of fit term and
a roughness penalty</p>
      <p>minU≥0,V ≥0||A − UVT ||2F + λ(||U||1 + ||V||1), (1)
where the parameter λ ≥ 0 indicates the penalty strength;
a larger penalty encourages sparser matrices U and V.
Adding penalties to NMF is a common strategy since they
not only improve interpretability, but often improve
numerical stability of the estimation.</p>
      <sec id="sec-5-1">
        <title>5.2. Smoothed Dynamic NNMF</title>
        <p>In the general case T &gt; 1, we have a sequence of matrices
{At}t=1 for time periods t = 1, . . . , T . To produce a
se</p>
        <p>T
quence of low-rank matrix factorizations {Ut, Vt}tT=1, we
can extend the factorization in (1) to the case T &gt; 1 by
independent factorization of T matrices {At}. However, we
additionally impose a smoothness constraint on both Ut
and Vt, in order to force the latent factors to be similar to
the previous time periods, in both boardings and alightings.
The objective function then becomes
minUt≥0,Vt≥0||At − U VtT ||2F</p>
        <p>t</p>
        <p>T
+μ Pt=2(||Ut − Ut−1||2F + ||Vt − Vt−1||2F )</p>
        <p>T
+λ(Pt=1 ||Ut||1 + ||Vt||1),
(2)
where parameters λ, μ are set by the user. The objective
function imposes smoothing Ut and Vt on two successive
time periods, but it can be generalized to a larger window.
To estimate matrices Ut and Vt, we use an extended
version of the multiplicative updating algorithm for
NNMF (Gillis &amp; Glineur, 2012; Lee &amp; Seung, 2001;
Mankad &amp; Michailidis, 2013), based an adaptive gradient
descent.</p>
        <p>Temporal extensions of matrix factorization techniques
have been studied in (Elsas &amp; Dumais, 2010; Mankad &amp;
Michailidis, 2013; Saha &amp; Sindhwani, 2012; Sun et al.,
2014). (Elsas &amp; Dumais, 2010) analyzed the temporal
dynamics of Web document content. To improve the
relevance ranking, it developed a probabilistic document
ranking algorithm that allows differential weighting of terms
based on their temporal characteristics. (Sun et al., 2014)
addressed recommendation systems with significant
temporal dynamics; it developed the collaborative Kalman
filter which extends probabilistic matrix factorization in time
through a state-space model. Community detection in
timeevolving graphs is analyzed in (Mankad &amp; Michailidis,
2013). The latent structure of overlapping communities is
discovered through the sequential matrix factorization.
To solve (2), we follow (Mankad &amp; Michailidis, 2013) and
consider the Lagrangian as follows
L = ||At − UtVtT ||2F +</p>
        <p>T
+μ Pt=2(||Ut − Ut−1||2F + ||Vt − Vt−1||2F )</p>
        <p>T
+ Pt=1(λ(||Ut||1 + ||Vt||1) + T r(ΦUt) + T r(ΨVt)),
(3)
where Φ, Ψ are Lagrange multipliers. The method works
as an adaptive gradient descent converging to a local
minimum. Kuhn-Tucker (KKT) optimality guarantees the
necessary conditions for convergence [44]. The KKT
optimality conditions are obtained by setting ∂∂ULt = 0; ∂∂VLt =
0, t = 1, . . . , T. It can be shown that the KKT optimality
conditions are obtained by
Φt = −2AtVt + 2UtVtT Vt − 2μ(Ut−1 − Ut) + 2λ,
Ψt = −2AtT Ut + 2VtUtT Ut − 2μ(Vt−1 − Vt) + 2λ,
(4)
which after matrix algebra manipulations lead to the
multiplicative updating rules presented in Algorithm 2.
The convergence of the multiplicative updating algorithm
is often reported slow. In practice we obtain meaningful
factorizations after a handful of iterations, which we tend
to explain by the sparseness of input matrices At. In the
future, when working with the dense data, faster
methods like active set version of the alternating non-negative
least squares (ANLS) algorithm (Kim &amp; Park, 2008) will
be more appropriate.
Algorithm 2 Dynamic Smoothing NNMF algorithm.
Require: Matrices At, t = 1, . . . , T , constants λ ,μ
1: Initialize Ut, Vt as dense, positive random matrices</p>
      </sec>
      <sec id="sec-5-2">
        <title>2: repeat</title>
        <p>ply the algorithm to sequences of service matrices Ats and
change matrices Atc, extracted from the full trip collection.
We thus obtain smoothed factorized matrices Us, Vts, and
t
Uc, Vtc, t = 1, . . . , T for services and changes,
respect
tively. At time period t, a boarding stop b has latent factors
given by a corresponding row in Uts this row is denoted
Uts(b). For an alighting stop a, row Vts(a) gives the latent
factors at time t. We then apply the algorithm to the sum
matrices, Atf = Atc + Ats, t = 1, . . . , T . The smoothed
factorized matrices for Atf are denoted Uf , Vtf .
t
To generate a feature vector x for a trip J , we may use
its decomposition into service legs and changes, J
(S, C). The vector x(J ) is then composed of a general
=
feature vector x</p>
        <p>g and four latent components, x(J ) =
{xg, xbs, xsa, xbc, xbc}, where
• xbs, xsa are latent feature vectors averaged over the trip
boarding and alighting places, respectively,
xbs =</p>
        <p>X Utsb (bi); xsa =
i</p>
        <p>X Vtsia (ai);
1
n
n
i=1
1
n
n
i=1
• xc, xca are latent feature vectors averaged over the
b
change places (alighting and boarding), respectively,
xbc =</p>
        <p>1
n − 1
n−1
i=1
X Utcb (bi); xca =
i</p>
        <p>1
n − 1
n−1
i=1
X Vtcia (ai).</p>
        <p>In the case of sum latent matrices Uf , Vf , x(J ) is
comt t
posed of a general feature vector xg and two latent
components, x(J ) = {xg, xbf , xfa} obtained from Utf and Vf .
t</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>6. Evaluation</title>
      <p>To test our method for learning a ranking function from
individual trips, we processed 5.2M individual trips
collected in Nancy, France during 3 months in 2012. Nancy
PT network includes 1129 nodes/stops and offers 107 bus
and tram services to travelers. We also processed 12.5M
trips from Adelaide, Australia collected during 2.5 months
in 2013. Adelaide network offers 312 bus and tram service
variations, and accounts for 3524 stops.</p>
      <p>To evaluate the impact of modeling user preferences
from actual trips, we selected 240 most frequent
origindestination pairs in Nancy (see Figure 4) and 160 most
frequent pairs in Adelaide.</p>
      <p>When generating temporal sequences of count matrices, we
test two cases of T = 24 and T =48, when any matrix
includes all passenger counts during one hour or 30 minutes.
Once a matrix sequence is generated, any matrix is
randomly split into 70% for training data and the remaining
30% for testing. All results below are means and variances
over 10 independent runs.</p>
      <p>We retrieved the trip planner recommendations for Nancy1
and Adelaide2. We learn the ranking function and use it to
re-rank the trip recommendations, using different options
described in previous sections. To understand the effect of
raw count factorization, we consider several options. First,
we collapse matrices so disregarding the temporal aspect.
Second, we consider either the service Ats and change
matrices Atc separately, or sum them up Atf = Ats+Atc before
the factorization. Third, we study the effect of temporal
smoothing, when factorization is done either independent
or by smoothing over successive time periods. Finally, we
test different values K for the factorization.</p>
      <p>In all experiments with GBRank (see Section 4.1),
parameter τ was set to τ = 0.3 and shrinkage factors βk to 0.8. For
smoothed dynamic NNMF, optimal values of μ and λ have
been determined by cross-validation. For evaluating the
results of ranking methods, we use a measure commonly
used in information retrieval, Normalized Discounted
Cumulative Gain (NDCG). We choose the perfect ranking’s
NDCG score 1 which is the error rate of the 1-top
recommendation.</p>
      <p>Table 6 reports the evaluation results for 12 different
methods and compares them to the trip planner baseline for both
cities. The analysis of these results provide some
interesting insights. First, results are globally better for smaller
Nancy than for bigger Adelaide, for both T
= 24 and
T = 48 cases. Second, collapsed matrices improve the
baseline somewhat, but only taking into account temporal
user preferences does really boost the performance.
Moreover, smoothed matrix factorization improves considerably
over the independent one. Third, the change latent
variables appear to be more relevant than services ones.
In1http://www.reseau-stan.com/
2https://www.adelaidemetro.com.au/</p>
      <sec id="sec-6-1">
        <title>City</title>
      </sec>
      <sec id="sec-6-2">
        <title>Method</title>
      </sec>
      <sec id="sec-6-3">
        <title>Baseline: Trip Planner</title>
      </sec>
      <sec id="sec-6-4">
        <title>Collapsed:Services</title>
      </sec>
      <sec id="sec-6-5">
        <title>Collapsed:Changes</title>
      </sec>
      <sec id="sec-6-6">
        <title>Collapsed:Services+Changes</title>
      </sec>
      <sec id="sec-6-7">
        <title>Collapsed:Sum</title>
      </sec>
      <sec id="sec-6-8">
        <title>Indep: Services</title>
      </sec>
      <sec id="sec-6-9">
        <title>Indep: Changes</title>
      </sec>
      <sec id="sec-6-10">
        <title>Indep: Services+Changes</title>
      </sec>
      <sec id="sec-6-11">
        <title>Indep: Sum</title>
      </sec>
      <sec id="sec-6-12">
        <title>Smooth: Services</title>
      </sec>
      <sec id="sec-6-13">
        <title>Smooth: Changes</title>
      </sec>
      <sec id="sec-6-14">
        <title>Smooth: Services+Changes</title>
      </sec>
      <sec id="sec-6-15">
        <title>Smooth: Sum</title>
      </sec>
      <sec id="sec-6-16">
        <title>Nancy</title>
        <p>T = 24
stead, using sum counts performs worse than keeping
service and change variables separately. We tend to explain
this by heterogeneity of service and change preferences.
time appear to be hard for all methods; the error is the
smallest for the periods 10am-12am and 2pm-4pm that
points to the correlation between the traffic and trip
variability. The traffic growth pushes travelers away from the
conventional traveling choices.</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>7. Conclusion</title>
      <p>We address the problem of relevance of trips recommended
by urban trip planners. We analyzed passengers’ trips
extracted from two public transportation systems.
We
propose a method for improving the recommendation
relevance by learning from choices made by travelers who use
the transportation system daily. We convert the actual trips
into a set of pairwise preferences and learn a ranking
function using the Gradient Boosting Rank method.
We
describe actual trips with a number of time-dependent latent
features, and develop a smoothed non-negative matrix
factorization to estimate the latent variables of user
preferences while choosing PT services and change points.
Experiments with real trip data demonstrate that the re-ranked
trips are measurably closer to those actually chosen by
passengers than are the trips produced by planners with static
heuristics.
C. Burges, T. Shaked, E. Renshaw, A. Lazier, M. Deeds,
N. Hamilton, and G. Hullender. Learning to rank using
gradient descent. In ICML’05, pages 89–96, 2005.
C. Burges, R. Ragno, and Q. V. Le. Learning to rank with
nonsmooth cost functions. In Proc. NIPS’06, pages 193–
200, 2006.</p>
      <p>Y. Cao, J. Xu, T.-Y. Liu, H. Li, Y. Huang, and H.-W. Hon.</p>
      <p>Adapting ranking svm to document retrieval. In Proc.</p>
      <p>SIGIR ’06, pages 186–193, New York, NY, USA, 2006.
B. Casey, A. Bhaskar, H. Guo, and E. Chung.
Critical
review of time-dependent shortest path algorithms: A
multimodal trip planner perspective. Transport Reviews,
34:522–539, 2014.</p>
      <p>J. L. Elsas and S. T. Dumais. Leveraging temporal
dynamics of document content in relevance ranking. In Proc.
WSDM ’10, pages 1–10, New York, NY, USA, 2010.</p>
      <p>ACM.</p>
      <p>Y. Freund, R. D. Iyer, R. E. Schapire, and Y. Singer. An
efficient boosting algorithm for combining preferences.
J. Machine Learning Res., 4:933–969, 2003.
1232, 2000.</p>
      <p>2012.</p>
      <p>N. Gillis and F. Glineur. Accelerated multiplicative updates
and hierarchical als algorithms for nonnegative matrix
factorization. Neural Comput., 24(4):1085–1105, April
R. Herbrich, T. Graepel, and K. Obermayer. Large margin
rank boundaries for ordinal regression. In Advances in
Large Margin Classifiers, pages 115–132, 2000.
P. O. Hoyer. Non-negative matrix factorization with
sparseness constraints. J. Mach. Learn. Res., 5:1457–1469,</p>
      <sec id="sec-7-1">
        <title>December 2004.</title>
      </sec>
      <sec id="sec-7-2">
        <title>H. Kim and H. Park. Nonnegative matrix factorization based on alternating nonnegativity constrained least squares and active set method. SIAM J. Matrix Anal.</title>
        <p>Appl., 30(2):713–730, July 2008.</p>
        <p>D. Lee and H. S. Seung. Algorithms for non-negative
matrix factorization. In Proc. NIPS’01, pages 556–562,</p>
        <p>J. Letchner, J. Krumm, and E. Horvitz. Trip router with
individualized preferences: Incorporating personalization
into route planning. In Proc. IAAI’06 - Vol 2, pages
1795–1800. AAAI Press, 2006.</p>
        <p>T. Liebig, N. Piatkowski, C. Bockermann, and K. Morik.</p>
        <p>Predictive trip planning-smart routing in smart cities. In
EDBT/ICDT Workshops, pages 331–338, 2014.
T.-Y. Liu. Learning to Rank for Information Retrieval.</p>
      </sec>
      <sec id="sec-7-3">
        <title>Springer, 2011.</title>
        <p>S. Mankad and G. Michailidis. Structural and functional
discovery in dynamic networks with non-negative matrix
factorization. Phys. Rev. E, 88:042812, Oct 2013.
L. McGinty and B. Smyth. Turas: A personalised route
planning system. In Proc. PRICAI’00, pages 791–791,</p>
      </sec>
      <sec id="sec-7-4">
        <title>Berlin, Heidelberg, 2000. Springer-Verlag.</title>
      </sec>
      <sec id="sec-7-5">
        <title>M. Mezghani.</title>
      </sec>
      <sec id="sec-7-6">
        <title>Study on electronic ticketing in public</title>
        <p>transport. European Metropolitan Transport Authorities
(EMTA), 38:1–56, 2008.</p>
        <p>A. Mokhtari, O. Pivert, and A. HadjAli. Integrating
complex user preferences into a route planner: A
fuzzy-setbased approach. In IFSA/EUSFLAT Conf., pages 501–
N. Lathia and L. Capra. Mining mobility data to minimise
M.-F. Tsai, Tie-Yan Liu, T. Qin, H.-H Chen, and W.-Y. Ma.
travellers’ spending on public transport. In Proc. ACM
Frank: a ranking method with fidelity loss. In Proc.
SIKDD’11, pages 1181–1189, 2011.</p>
        <p>GIR’07, pages 383–390, 2007.
approach to learning to rank: theory and algorithm. In</p>
      </sec>
      <sec id="sec-7-7">
        <title>J. Yuan, Yu Zheng, X. Xie, and G. Sun. Driving with knowledge from the physical world. In KDD ’11, pages 316–324, New York, NY, USA, 2011. ACM.</title>
        <p>Z. Zheng, K. Chen, G. Sun, and H. Zha. A regression
framework for learning ranking functions using relative
relevance judgments. In Proc. SIGIR ’07, pages 287–</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          294, New York, NY, USA,
          <year>2007</year>
          . ACM.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>