An Application of Network Lasso Optimization for Ride Sharing Prediction

An Application of Network Lasso Optimization
for Ride Sharing Prediction

Shaona Ghosh Shaona Ghosh University of Oxford, UK
22email: Page University of Oxford, UK
44email: De Roure University of Oxford, UK
   Kevin Page Shaona Ghosh University of Oxford, UK
22email: Page University of Oxford, UK
44email: De Roure University of Oxford, UK
   David De Roure Shaona Ghosh University of Oxford, UK
22email: Page University of Oxford, UK
44email: De Roure University of Oxford, UK

Ride sharing has important implications in terms of environmental, social and individual goals by reducing carbon footprints, fostering social interactions and economizing commuter costs. The ride sharing systems that are commonly available lack adaptive and scalable techniques that can simultaneously learn from the large scale data and predict in real-time dynamic fashion. In this paper, we study such a problem towards a smart city initiative, where a generic ride sharing system is conceived capable of making predictions about ride share opportunities based on the historically recorded data while satisfying real-time ride requests. Underpinning the system is an application of a powerful machine learning convex optimization framework called Network Lasso that uses the Alternate Direction Method of Multipliers (ADMM) optimization for learning and dynamic prediction. We propose an application of a robust and scalable unified optimization framework within the ride sharing case-study. The application of Network Lasso framework is capable of jointly optimizing and clustering different rides based on their spatial and model similarity. The prediction from the framework clusters new ride requests, making accurate price prediction based on the clusters, detecting hidden correlations in the data and allowing fast convergence due to the network topology. We provide an empirical evaluation of the application of ADMM network Lasso on real trip record and simulated data, proving their effectiveness since the mean squared error of the algorithm’s prediction is minimised on the test rides.

Machine Learning Networks Ridesharing Optimization

1 Introduction

City councils and private commercial companies with a smart city initiative have recently been aiming for facilitating ride sharing of public and private transportation systems that provide significant environmental benefit in terms of reduced energy consumption and carbon footprint. Ride sharing is a service that arranges shared rides or carpooling on very short notice by better utilization of empty seats in vehicles. of This is especially important during the rush hours when there is a significant surge in demand for public transport leading to long waiting times and higher tariff rates for the commuter. This is when an elevated supply of vehicles aggravates traffic congestion and carbon emissions, while lowering the net income for the drivers when the demand subsequently falls following the rush hour. It is therefore imperative to develop smart ride sharing algorithms to optimize for the best outcome.

Figure 1: Smart City Ride Share Prediction System.

Traditionally such ride sharing systems are accompanied by a smartphone or tablet based application, with which potential riders can make real time requests. The system then dispatches the ride shared vehicle or taxis for the pick up after a decision making process that usually takes place in the cloud. The vehicles are also equipped with a version of the application that can communicate with the server. Typically, there are two stages to the planning: (i) first vehicles are searched that match the different constraints and criteria of the ride share scenario. For example, search and match the vehicle within mile radius of the with an available capacity of at least ; (ii) the search and match phase is typically followed by the schedule or plan for the pick-up whilst satisfying the minimum increase in distance, costs and maximum profit margin for both the riders and the drivers. The Figure 1 illustrates such a smart city ride share system with the commuter images taken from the Pascal VOC 2012 challenge pascal-voc-2012 (). In reality, most ride requests are generated in real-time almost near the commute time. The requests need to be processed with minimum response time delay whilst addressing the dynamic context such as the current rush hour surge demand among others. In this work we address this quick response and dynamic context of serving shareable rides to new requests by using models learnt on historical data.

2 Motivation and Contribution

Most ride sharing systems cannot learn models to facilitate dynamic real-time prediction of ride sharing opportunities before the actual scheduling, searching and matching process. Specifically learning a model of interactions and using the same model for new data is novel to the applications in this field. We are motivated by simplifying the search, match and scheduling phases: by bridging the gap in learning from the correlations in the ride or trip data for optimization and clustering followed by efficient predictions before the planning and scheduling stage. Intuitively, this is because if latent groupings are detected in the data, then the search space for the optimization problem is drastically reduced. Additionally, jointly optimizing and clustering can avoid the separation of different phases and save significant delay in response time to a ride request.

Consider, an example, pick up locations A 40.747, -73.893, B 40.69, -73.969, C 40.82,-73.944, D 40.744,-73.912, A and B are 6.5 miles apart, A and C are 7.1 miles apart. B and C are 13.5 miles apart (route with tolls), D and C are 8.2 miles apart (route with tolls) and D and B are 5.7 miles apart. Further, the route with tolls have heavy congestion at the time of request C, known from past information. Also, the requests within miles within C have in the past rated the rides shared from around D negatively. Requests from around the region B have found rides shared with region from A expensive. With all this information, a possible clustering is A,C and B,D. Knowing the implicit clustering before the planning and scheduling phase saves the costs and the delay involved in re-planning, resource allocation, optimizing over all the four rides and serving requests.

Lasso is a statistical machine learning technique that is known for its capabilities for simultaneous variable selection and estimation of the function with added regularization. Automatic variable selection is useful especially when all the variables pertaining to the ride might not carry meaningful information or might not be available. Variants of Lasso can capture correlations between various parameters of A, B, C and D to optimize and cluster them jointly.

To the best of our knowledge this is the first application of a joint optimization, clustering and prediction framework within the ride sharing purview that is fully scalable.

Figure 2: Network Lasso Ride Share Optimizer.

An emergent property of the system we propose is its ability to predict the optimal pricing based on the clusters. Such optimal pricing is imperative in case of commercial systems like Uber that apply surge pricing for rush hours when the demand is high. The danger of surge pricing by a multiplicative factor is that it can lead to a reduction of rider interest. If the surge pricing can be predicted beforehand by learning the patterns from the historical data, the supply can be adequately increased or ride share opportunities provided to offset the surge pricing.

2.1 Summary of Contributions

The main contributions of this paper can be stated as follows:

  • We conceive an application of a robust and scalable machine learning enabled large scale ride sharing system that learns a model of correlations from historical trip/ride request data, and uses it to predict ride sharing opportunities on current data.

  • Applying Network Lasso convex optimization algorithm hallac2015network () can jointly optimize model parameters, detect hidden clusters and predict parameter value on test trip/ ride requests thus reducing the search space for any traditional ride sharing system phases to follow if required.

  • The empirical evaluation of the application of Network Lasso algorithm on simulated and real datasets, show the efficient grouping (clustering) of training trip records, deducing test trip record (not yet served) model parameters based on its cluster membership and accurate prediction of its fare pricing.

3 Related Work

Carpooling systems and recurring ride sharing systems carpool1 (); carpool2 () have studied the ride sharing problem, although investigating the daily commute routine only with requests that were preplanned. In the works that have studied the real-time ride share prediction problem such as ma2013t (); ma2015real (), the focus of their methods was on the searching and scheduling of the taxis for ride sharing. For example, searching the ride sharing vehicle closest to the pick up points or scheduling the vehicles such that the total distance is minimized. In our work, the main focus is placed on the stage prior to the searching, scheduling and matching riders to drivers. The model learnt during this stage can enable real time prediction at later stages. The research work in the dial-a-ride problems (DARP) cordeau2007dial (); horn2002fleet () have studied static customer ride requests which are known a-priori.

Although these methods perform grouping of requests beforehand, requests do not get served real-time. In the work of Zhu et. al. 7471482 (), the authors focus on path planning algorithm for the ride share vehicles with minimized detour. Further, capturing the spatio-temporal underlying features of the rides in our work is at the stage of inferring similarities in rides by means of grouping which is different from the spatio temporal embedding in the work of Ma et. al. ma2013t (); ma2015real (). They form the topology over rides based on if rides can be shared together. In out work, the topology over rides is used to find Traditionally, as evident from the works of ma2015real (), a Poisson Model is assumed for the distribution over the ride requests. We assume a similar distribution of the ride requests with which we simulate the real time requests for prediction. In the work of Santi et. al. santi2013taxi (), a network topology is used for ride share prediction in the similar way as we do. However, our method differs in the optimization that we adapt for ride related data, jointly optimizing on individual objective and neighbouring objectives on the graph. Other literature focuses on efficient scheduling of ride share vehicles (path planning) ma2015real (); ma2013t (), recommendations for drivers recomm1 (); recomm2 (), pricing for commuters mobile () and impact of ride sharing mobile (); ccolak2016understanding () or static grouping of riders recomm1 (); recomm2 ().

4 Formulating a Ride Sharing Model

Regression analysis is a well known machine learning paradigm in the statistical method of estimation of the relationship among variables. An important criterion of this analysis is establishing how the behaviour of the dependant variable changes with respect to the multiple independent variables. Supervised regression friedman2012fast () is capable of inferring the functional relationship between the output variable and the input variable; the learnt model is then used to predict the output response on new input data. The learning is performed by comparing the quality of the predicted response value from the model that the algorithm comes up with with the true response value by means of a loss function. Progress is made by the algorithm by taking minimizing the loss over all the data that it sees.

4.1 Learning the Model by Lasso Regression

Lasso based optimization technique is a type of regression analysis that can automatically detect which independent variables are important in influencing the behaviour of the dependant variable. Lasso algorithms tibshirani1996regression () can perform feature selection and supervised regression simultaneously. For example, the variable pertaining to the ride fare might not be available for a particular set of records whilst they might have the drop off location. Lasso can automatically select some of the dependant variables that strongly influences the model from the variables present. In the example, it is capable of selecting the drop off location to interpolate the fare from the distance travelled in the model for those records where it is absent. Additionally, Lasso helps induce the sparse (zeroed variables) representation within the model such that the contribution from some variables can be turned off selectively. For example, in the model, Lasso may completely ignore the contribution of the variable payment-type by setting it to zero as payment-type has no correlation with total fare. This is made possible by the use of a regularization penalty that penalizes for complex models (many non zero variables) over sparse models (many zero variables) such that the model better generalizes to test data.

Let us consider a social system where different ride requests that are being orchestrated simultaneously. Let denote any such ride request that is being optimized within the framework. Let us assume the scenario can be modelled by a function of some linearly independent variables measured over a period of time that describes a ride request or a ride served. Let denote the mapping between the variable , where encodes the behaviour of the system and is the response or outcome such that . The only assumption on the function is that it is a convex smooth function. is number of observations for the pair . For simplicity, let encode four independent variables describing a ride such as distance, time-of-day, pick up location and payment-type. The unconstrained Lasso formulation is given by the following equation.


In Equation 1, is the predicted response value of the regression model whereas is the actual value and is the non-negative regularization parameter. The first term in the quadratic programming formulation measures the loss between the predicted response variable and the true response variable while the second term in the Lasso penalty or L- norm that ensures the sparsity in the model (minimizing the sum of absolute values of the variables). The output of Lasso is a model that is capable of interpolating the total fare of the ride as a function of the variables of any new ride request.

Figure 5: Taxi Pick-up request distribution (a) Day of the week (b) Hour of the day.

4.2 Alternating Direction Method of Multipliers Optimization

Typically, for large scale problems with immense datasets where and is very large, the vanilla Lasso technique is hindered in terms of scaling with the data; that is the optimization becomes extremely time consuming. In our situation, a full fledged social system like ride sharing system may have ride data records in the order of millions of observations of multi-dimensional variables. Essentially, a fully scalable and robust system should scale with the number of observations and the number of variables . Optimization without exploiting structure in the problem makes the convergence time scale with the cube of the problem size boyd2004convex (). For such situations, optimization in the primal may be cumbersome and one should resort to optimization techniques in the dual. Dual decomposition ensures that the function can be decomposed and each decomposition can be solved separately. This leads us towards investigating dual decomposition technique for scaling the computation across multiple computing resources. One such technique is Alternating Direction Method of Multipliers (ADMM) wahlberg2012admm ().

Figure 6: Taxi Pick-up request distribution over day of the month.

This method guarantees the decomposition and robustness with the introduction of new augmenting variables and constraints. In other words, under certain assumptions, additional auxillary variables can be introduced to the optimization problem that enable decomposition of the problem with additional constraints for distributed optimization. This allows scalability and robustness. Let us consider the Lasso model in Equation 1, within the ADMM model that can be written as: {dmath} minimize   12 ||f(x_i)-f(~x_i)||_2^2 + λ|z_i|_1
subject to  x_i-z_i = 0. where is a copy of , is introduced to treat the second term as a decomposable term in the minimization, such that the two terms can be minimized in parallel towards minimizing the global objective. In our example, is the copy of the ride . The constraint is the consistency constraint linking the two copies. From this point onward, when we refer to , we mean for any ride scenario . In our example, this is equivalent to distributing the modelling of the total fare of the ride as a function of the ride’s different variables over multiple processing units, such that each ride is being optimized on a different processor in parallel. This allows the model to converge much faster than the non distributed (non ADMM) Lasso. As is the case with ADMM, the steps of the optimization can be broken down into a series of update steps derived from the augmented Lagrangian of Equation 4.2. We can rewrite as , where is the coefficient matrix, such that the system of linear equations is given by , where b is the response vector. So Equation 4.2 can be rewritten as:


minimize   12 ||Ax-b||_2^2 + λ|z|_1
subject to  x-z = 0. The augmented Lagrangian of Equation 4.2 is given by: {dmath*} L_ρ(x,z,u) = 12 ||Ax-b||_2^2 + λ|z|_1 + u^T(x-z) + ρ2||x-z||_2^2. where is the Lagrangian, is the Lagrange multiplier, and is the cost for violating the consistency constraint. Minimizing with respect to and separately, and jointly, leads to the iterates. The iterates can be updated in a distributed way yielding the scalability for very large problems. The main advantage in using ADMM based Lasso besides robustness and scalability is in its guaranteed global convergence.

The update can be derived by minimizing with respect to . We know , ,

We know from the quadratic term , and the linear term where is a vector. So we have:

Hence, can be updated at time with values of iterates and from time . is positive definite and hence invertible.

Similarly, the update is also obtained by minimizing with respect to for and . The update for is obtained from a soft shrinkage solution. In the simulation experiments that we discuss in 5.1, we show how the Lasso optimization model is capable of estimating the response variable with respect to the input variables. The Lasso is used mainly in an optimization problem for inferring the model of the variables.

Figure 7: Correlations between the pick up and drop off times of trip parameters with pick up times on the x axis and drop off times on the y axis.

As we shall see in section 5.1, ADMM Lasso is capable of modelling the utility of rides as function of different synthesized ride parameters using distributed optimization.

4.3 Network Lasso ADMM Optimization

The Network Lasso hallac2015network () algorithm is a generalized version of the Lasso to a network setting that enables simultaneous optimization and clustering of the observations. Network Lasso hallac2015network () extends the power of Lasso algorithms through structured learning over a graph topology. The topological structure allows for joint optimization. In our example, this means groups of rides gets automatically clustered and optimized to have the same models of the total fare as a function of their ride parameters. Not only the grouping of rides is performed based on similar rides being grouped together, the optimization problem also computes the fare model across such groups in a consensus.

Let a graph be described by , where is the set of vertices and is a set pf edges connecting neighbouring vertices. The graph or network as shown in Figure 2 encodes the input data such that each data point is represented as a vertex. In our case, each vertex represents a ride trip record or a ride request. The similarity between the trip records or requests is encoded as an edge. The objective that Network Lasso tries to solve is expressed in the Equation below. The variables are , where is the number of trip records or ride requests, and is the number of features of the ride, with a total of variables for optimization hallac2015network ().


Similar to Hallac et. al. hallac2015network (), the function at node is the local objective function for the data point whereas the is the global objective function associated with each edge with and the weight over the edge (a measure of similarity) . The edge objective function penalizes differences between the variables of the adjacent nodes thus inducing similar behaviour; leading to groups of nodes or clusters that behave similarly; the solution to the optimization problem is the same across all nodes in a cluster. In other words, each cluster has the same model (functional mapping between the ouput and input variables). In our example this would imply similar ride share records get grouped into clusters and hence similar plans and schedules can be allocated to these clusters. The only assumption is on the convexity of the function .

It is important to note the role of , which is a regularization parameter to control the optimization process. Based on the value of , the optimization process trades off optimzing for the node variables and edge variables. The range of values of determine the level of optimization. For smaller values of , optimization is performed at the node level while for larger values, the edge optimization comes into play inducing the adjacent nodes to have similar model. The edge cost is the sum of norms on how different the adjacent ride records are from each other and the penalty that needs to be paid within the model for large differences. In other words, the edge objectives encourage nodes to be in consensus (have a similar model). In our application, we use the regularization such that the edge penalties are active. The vanilla Lasso technique discussed above, essentially maps to the scenario where , when the individual nodes are optimized independently without the edge optimization. With the Network Lasso formulation 2, we not only achieve a robust, scalable and distributed optimization algorithm, but we are guaranteed to obtain global convergence. The edge objective function is the adds the “network” aspect to the vanilla Lasso optimization, by inducing a relationship between individual node variables. In fact, in our example, this edge objective minimization allows for clustering of rides based on their optimization models. In the following section we evaluate Lasso, ADMM and Network Lasso techniques with synthesized and real dataset of ride observations illustrating the accuracy of the optimization while presenting ride sharing opportunities.

5 Model Validation and Experimental Evaluation

In this section, we discuss the experiments conducted on synthetic and real world datasets to validate the efficiency of the techniques that we propose in the previous section. The section begins with a description of the synthetic experiment we design in order to evaluate the modelling, feature selection and prediction accuracy of the application of the vanilla ADMM Lasso technique to an unknown linear model of variables encoding a ride. Following this discussion, we explain the real dataset experiments, where the open trip record dataset of the green taxis from the New York Taxi and Limousine Commission nyc-2015 () is used. We apply Network Lasso on this dataset to enhance the capabilities of vanilla ADMM Lasso in modelling, while being in consensus with the models of the neighbourhood trips.

5.1 Synthetic Dataset and Experiment

The synthetic dataset is constructed by exploring the linear relationship between the multidimensional variables of the underlying ride sharing model that we assume. For n simplified linear model for a ride request ,


we assume variables such as , , , and uniformly distributed . The variable ratings encodes the past feedback of the shared ride experience rating in the past. Variable preferences are the choices of the commuter for example sharing with more than 1 or sharing with 1, pickuptime and pickuploc are the requested time and location of pickup respectively while cost is the expenses related to the ride. The value encodes the utility value of the ride as a function of all the variables. These variables or regressors are related in terms of parameters of the ride given by , which is not available to the algorithm. It should be able to deduce the latent model based on the given final fare values and the regressors. The application of the ADMM Lasso algorithm enables learning the relationship between the ride variables by modelling them efficiently. The model is improved over many such ride request data records to minimize the error between the internal algorithm model and the true model in hindsight. To this end we apply the Lasso regression technique discussed before in Equation 1.

Figure 11: Convergence of Lasso ADMM over Iterations for Varying (a) with very early convergence but complex model (b) convergence at 50 iterations with simpler model (c) with no convergence at the minimum objective value.

For robustness we randomly sample examples with features. The coefficient matrix constituting the ride variables is generated as a Gaussian distributed sparse matrix with a known sparsity density, we use a sparsity density of . The output variable corresponding to the input variables is computed as a linear combination between the coefficient matrix and a random sparse vector and some Gaussian noise. We vary the value of the Lasso parameter in a range of , to evaluate the influence on the smoothness of the optimization. The values of the ADMM parameters is fixed to and that of is fixed to . For all our simulation experiments, we adapt the ADMM Lasso code lassocode () for our data, the code for which is written by us. The experiments were carried out on a Windows Desktop PC with 16GB RAM and i7 processor using Matlab.

The results of our simulation experiments are shown in Figure 11. Higher values of induce more sparsity, by penalizing complex models thus allowing simpler model where most of the variables are zeroes. This is desirable for generalization and high accuracy on any test time (new) data. Lower values of the penalty parameter allow for denser solutions with more non-zeroes. A trade-off is often desired to have simpler models that do not over-fit the training data and that generalizes to test data. In the Figure 11, the value of minimum of the loss function in Equation 1 (vertical axis) on all the plots across time (horizontal axis); the lower the difference between the predicted fare value and the ground truth fare value, the better. In (a), the solution converges quickly for . However this model is complex and can overfit the data on the test data. The total number of non zero variables are . In (b) with , the solution takes longer to converge than (a) with higher prediction error than (a). The number of non-zeroes is 1673 which is about 30 percent of the variables out of 5000. This shows how Lasso is capable in capturing the 30 percent most important ride variables that contribute to the model. In (c), for higher , the solution is very sparse, however the error increases as the model in unable to fit the data, with number of non-zeroes being only 636. It is important to note that although Lasso by itself can induce generalized solutions, the use of ADMM approach for large datasets is desirable for faster convergence as shown here where the convergence happens within 50 iterations in 11 (b) .

5.2 New York Taxi Data Experiment

5.2.1 Dataset

The real-world dataset with attributes as shown in Table 1 constitutes about one billion records of various taxi trips recorded over the entirety of 2015 nyc-2015 () in the city of New York. Here, we only use the green taxi trip records for the month of January, 2015 to conduct our experiments. Each record in the dataset pertains to a ride that was served by a green taxi. The various attributes of the ride are defined by variables such as pick up time, drop off time, pick up location, drop off location, base fare, tips, tax, passenger count, trip distance, trip type among other variables. It is important to note that the green cabs do not serve on the Manhattan area as we will see later on the plots overlaid on the maps.

We perform an initial visualization of the dataset for any obvious data pattern.

Figure 12: Correlation across different trip record optimization parameters.

In Figure 5 shows the distribution of the users asking for a taxi ride. The requests are plotted for each day of the week and every hour of the day. As expected, we observe from the distribution over days of the week in (a) that shows the weekend and Fridays having an increased demand of taxis. On the plot of the distribution over hours of the day in (b) we observe that there is sharp increase in demand during the rush hour as well as there is a surge in taxi demand during the evening from rush hour through the evening. We observe that most demand is in the early morning hours, when it is difficult to take public transport, continuing into the morning rush hour. The second surge is in the evening rush hour that peaks at around 19:00 hours. The plot over the week is a random week in the month of January, while the plot over the day is a random day of the month of January.

vendorId pickuptime dropofftime storeflag
ratecode pickuplong pickuplat dropofflong
dropofflat passengercnt tripdistance fareamt
extra mtatax tipamt tollamt
ehailfee surcharge totalamt paytype
Table 1: NYC Taxi Dataset Attributes

The Figure 6, we plot the distribution of ride requests throughout the first month in January, 2015. The th day of the month is an exception as there were severe travel restrictions on that day due to heavy snowfall.

Figure 13: Frequency distribution of pickup requests over the hour.

Figure 7 shows the correlations between the pick up time and drop off time of over ride requests randomly sampled over days and that is used for modelling. As expected the pick up and drop off times are positively correlated. In Figure 12, the correlation between different feature variables are shown. As expected the variables fare amount and trip distance are positively correlated with each other. The surcharge is also positively correlated with the tripdistance and the fare amount. The tip in turn is positively correlated with the trip distance and the fare amount. Figure 13, shows the pick up requests generated on the first day of the month of January 2015 per hour. What is interesting is that the distribution of the pick ups behave like a Poisson distribution based on the nature of the curve. In practice, Poisson distribution is often used to model pick up requests. Since we have such a distribution available from the data, it is practical that we use this realistic distribution to sample our test data to evaluate the prediction of the algorithms.

Figure 14: Heat map of the network derived from the random subset of trips.

In the Figure 14, we observe the heatmap result from the network obtained from the dataset. The network is a relatively dense network with distances varying between 0 kilometre (distance with itself) indicated in dark blue to 30 kilometres indicated in yellow. The map indicates ride parameters that are closer to each other in similar colour.

In Figure 15, we show the network as generated from the data. The network is based on the spatial information encoded in the data. Basic modularity based on this spatial information shows how the network is formed of dense clusters. Each cluster is indicated by an individual colour and clusters are formed each indicated with a different colour. It is interesting to note that since these are only spatial clusters, optimizing based solely on these clusters would not factor in consensus in the models. For example, two spatially distant rides, may have the same underlying model of optimization with parameters behaving similarly.

Figure 15: Spatial clusters without optimization. Network rendered using Gephi software. Edge colours same as source cluster membership colour.

5.2.2 Network Lasso Experiments

We apply the network lasso technique to data sampled randomly from the taxi trips dataset described in the previous section. Our training set comprises random subsets sampled from different times of the first and second days of the month. The Network Lasso algorithm hallac2015network () learns the model on the training set with a known output response variable. Once the model is learnt, the prediction of the model is evaluated on a test set. The test set is again randomly sampled; the test set does not include any training data. The optimized data attributes are all the attributes other the spatio temporal data. The spatio temporal data is fed as the network information to the algorithm; each trip record is a node in the network. The algorithm optimizes for the total fare value at each node while ensuring consensus among neighbourhood data. The result is a grouping of the network into clusters with similar models. The advantage is these clusters can be used to predict on any new data. Here, for every instance in the test set, the error between the predicted total fare value and the true total fare value is calculated, and the mean squared error is reported for different values of . Varying tunes how much of consensus is desired between the node models. We adapt the code provided by Hallac et al. nwlassocode (). All the experiments are run on a Linux desktop PC with 12 GB RAM and i5 processor using Python.

In Figure 18, (a) we show how the consensus over the test set varies over different values of , the higher the value of the consensus indicates more nodes in the network are in sync. (b) Shows how the mean squared error (mse) varies with the . As seen, for the right range of , the falls to the minimum as lambda slowly increases. This shows the prediction accuracy of the algorithm and its applicability to modelling the economic interrelationships of the underlying ride parameters; and robustness to early convergence resulting from the network consensus. Without the network consensus, the time taken to convergence would be cubic. Such accurate fare prediction can be used by the ride sharing application for efficient fare pricing by jointly factoring in that similar models of rides can be grouped together and shared.

Figure 18: Consensus in optimization model and error in prediction (a) consensus over (b) mean squared error over .
Figure 21: Clustering membership deduced for test data based on training clusters (a) neighbourhood structure (b) neighbourhood structure.

5.3 Discussion

In Figure 21, we show the clustering of a portion of the test data set as performed by the algorithm. The test data point is indicated by asterisk markers, the colour of the marker is deduced by the algorithm which decides its cluster membership. There are four clusters (each indicated with a different colour) which the algorithm assigns to the test point such that its variables can be deduced based on the cluster to which it belongs, or is closest in terms of the similarity of their models. (a) uses a five neighbourhoods and (b) uses a ten neighbourhood structure resulting in more overlap. It is important to note the following observations. First, spatially distance rides can be grouped together if there is similarity in their model parameters along with the spatial closeness. This is an unique emergent property of this work in the context of ride sharing. Traditional ride sharing systems group rides that are only close geographically, but the method that we discuss is capable of doing both. Second, in traditional systems the grouping and the optimization are usually separate processes. Optimization decoupled from the network structure takes longer to converge, resulting in delay in responsiveness of serving rides. In Figure 24, we magnify the cluster that the algorithm decides the test point belongs to. The test point is indicated by the black markers. For the test point in (a) it belongs to the red cluster and the test point in (b) belongs to the blue cluster.

Figure 24: Deducing cluster membership for (a) Test trip node 77 indicated in black (b) Test trip node 193 indicated in black.

Figure 25 shows an alternative illustration of the clustering detected by the algorithm where the grouping location is not overlaid on the map and instead just shown on the basis of the predicted values. Similar models predict the similar value and the colour indicates the value ranges that the trip nodes belong to.

Figure 25: Clustering based on Predicted Values on Training Set.

The Figure 28 shows the vanilla Lasso prediction without the network data to validate the accuracy of prediction. Vanilla lasso converges to the minimum value of the objective function in terms of learning the model but is incapable of finding any cluster or groupings in the rides.

Figure 28: Objective values across iterations with ADMM Lasso.

6 Conclusion

In this work, we make a novel connection between the ride sharing scenario and a scalable and robust optimization technique called Network Lasso optimization. We apply different well known techniques from the statistical regression analysis and machine learning paradigm to synthetic and real world data that encodes ride related attributes and variables, in order to perform joint optimization and clustering of similar rides that share similar models. To the best of our knowledge, this work is the first attempt in applying techniques that jointly optimizes and clusters rides in order to predict new ride sharing opportunities based on a network topology of rides. Rides that are similar in the modelling of their parameters get grouped together and hence can be shared. We evaluate the accuracy of the applications of Lasso, ADMM and Network Lasso on the synthetic dataset and real world dataset of green taxi trip records from the New York Taxi and Limousine Commission open data. We observe that vanilla ADMM Lasso achieves convergence within 50 iterations, but cannot sufficiently explore the network topology. Network Lasso however achieves an accuracy of 99.8 percent with a efficient clustering of 8 percent. We also notice that Lasso in itself ensures a sparsity and generalized model with automatic feature selection of 30 percent for rides with variables spanning 5000 dimensions in the synthesized dataset. We conclude that ADMM Network Lasso in particular is an efficient framework for large scale ride sharing systems that require distributed, scalable optimization with sufficient exploitation of the network topology of the similarity among rides for predicting new sharing opportunities. As, future work, we would like to extend the algorithms for prediction in less information environments where there is not enough training data due to lack of real life systems.


  • [1] Parikh N. Chu E. Peleato B. Boyd, S. and J. Eckstein. Matlab scripts for alternating direction method of multipliers. boyd/papers/admm/.
  • [2] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004.
  • [3] Roberto Wolfler Calvo, Fabio de Luigi, Palle Haastrup, and Vittorio Maniezzo. A distributed geographic information system for the daily car pooling problem. Computers & Operations Research, 31(13):2263–2278, 2004.
  • [4] Serdar Colak, Antonio Lima, and Marta C Gonzalez. Understanding congested travel in urban areas. Nature communications, 7, 2016.
  • [5] Jean-François Cordeau and Gilbert Laporte. The dial-a-ride problem: models and algorithms. Annals of Operations Research, 153(1):29–46, 2007.
  • [6] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2012 (VOC2012) Results.
  • [7] Jerome H Friedman. Fast sparse regression and classification. International Journal of Forecasting, 28(3):722–738, 2012.
  • [8] David Hallac, Jure Leskovec, and Stephen Boyd. Network lasso: Clustering and optimization in large graphs.
  • [9] David Hallac, Jure Leskovec, and Stephen Boyd. Network lasso: Clustering and optimization in large graphs. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 387–396. ACM, 2015.
  • [10] Mark ET Horn. Fleet scheduling and dispatching for demand-responsive passenger services. Transportation Research Part C: Emerging Technologies, 10(1):35–63, 2002.
  • [11] Alexander Lauren and Marta C González. Assessing the impact of real-time ridesharing on urban traffic using mobile phone data. Transportation Research A: Policy and Practice, 2015.
  • [12] Shuo Ma, Yu Zheng, and Ouri Wolfson. T-share: A large-scale dynamic taxi ridesharing service. pages 410–421, 2013.
  • [13] Shuo Ma, Yu Zheng, and Ouri Wolfson. Real-time city-scale taxi ridesharing. Knowledge and Data Engineering, IEEE Transactions on, 27(7):1782–1795, 2015.
  • [14] Aristide Mingozzi Roberto Baldacci, Vittorio Maniezzo. An exact method for the car pooling problem based on lagrangean column generation. Operations Research, 52(3):422–439, 2004.
  • [15] Paolo Santi, Giovanni Resta, Michael Szell, Stanislav Sobolevsky, Steven Strogatz, and Carlo Ratti. Taxi pooling in new york city: a network-based approach to social sharing problems. arXiv preprint arXiv, 310, 2013.
  • [16] NYC Taxi and Limousine Commission. Tlc trip record data.
  • [17] Robert Tibshirani. Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society. Series B (Methodological), pages 267–288, 1996.
  • [18] Bo Wahlberg, Stephen Boyd, Mariette Annergren, and Yang Wang. An admm algorithm for a class of total variation regularized estimation problems. arXiv preprint arXiv:1203.1828, 2012.
  • [19] Wei Wu, Wee Siong Ng, Shonali Krishnaswamy, and Abhijat Sinha. To taxi or not to taxi?-enabling personalised and real-time transportation decisions for mobile users. Mobile Data Management (MDM), 2012 IEEE 13th International Conference on, pages 320–323, 2012.
  • [20] Desheng Zhang, Tian He, Yunhuai Liu, and John A Stankovic. Callcab: A unified recommendation system for carpooling and regular taxicab services. Big Data, 2013 IEEE International Conference on, pages 439–447, 2013.
  • [21] M. Zhu, X. Y. Liu, F. Tang, M. Qiu, R. Shen, W. Shu, and M. Y. Wu. Public vehicles for future urban transportation. IEEE Transactions on Intelligent Transportation Systems, PP(99):1–10, 2016.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description