Predicting Traffic Dmitriy Bespalov
Imagine… You are driving on a highway Congestion Ahead! GPS Congestion Ahead! Faster route found! Take next exit!
Imagine… You are sitting in your cubicle Receive a regular alert from Traffic.com: If you leave now, you will spend 30 min driving If you leave in 30 minutes: 45 minutes If you leave in 1 hour: 60 minutes Better go now, dude!
? Predicting Traffic Sensor Network History of road conditions real-time data history data ? Predicting Server predictions
Predicting Traffic 37 min Data Locations + + How long? Belmont How long? + 12 min 37 min I-476 Need to predict travel times on smallest granularity roads’ segments – Data Locations
Predicting Traffic For single road’s segment (Data Location): Record delay values for one day: Perform same process for multiple days: Delay (min) Time of day (hours) 6 am 12 pm 6 pm 12 am Historical Data
Last 20 minutes’ travel-times Predicting Traffic For single road’s segment (Data Location): Historical Data Find similar pattern Last 20 minutes’ travel-times Prediction Length Predicted Delay Match!
How Predictions Are Made Storing historical data takes a lot of space: One reading every minute: 1440 per day 90 days of readings for historical data set And this is for one segment! Philadelphia has about 430 such segments Total: 55,728,000 readings to store And simply storing data is not enough: Need to query historical data efficiently Otherwise no use for real-time system
How Predictions Are Made Compression required to reduce data size Used piece-wise linear data fitting Points were replaced with line segments While closely fitting original data 14 points for 1 day of readings (1440 before)
How Predictions Are Made
How Predictions Are Made
How Predictions Are Made delay Historical Data time Find similar pattern Last 20 minutes’ travel-times
How Predictions Are Made Historical Data Last 20 minutes Data Location 2 Better Match! Data Location 1 Data Location 3 time
How Predictions Are Made For every match, assign distance measure Sort all matches based on distance Extract k-closest matches For each of k matches produce prediction Combine k predictions for final answer
Prediction Accuracy The predictions are nearly perfect…
Prediction Accuracy The predictions are nearly perfect…
Prediction Accuracy The predictions are nearly perfect…
Prediction Accuracy The predictions are nearly perfect…
Prediction Accuracy The predictions are nearly perfect…
Prediction Accuracy The predictions are nearly perfect…
Prediction Accuracy … yeah, right…
Prediction Accuracy … yeah, right…
Prediction Accuracy … yeah, right…
Prediction Accuracy Average prediction error: 0.17 minutes Standard deviation: 0.67 minutes Average relative accuracy: 75%
Demo
How to Improve Accuracy? Use better similarity measure for patterns Classify historical data: Traffic on Mondays is usually similar Traffic on Sundays is usually not the same as on Mondays Don’t need to search Sundays if today is Monday Learn accuracy adjusting functions Function will attempt to correct predicted values Learn these functions in the background of Predicting Engine: Using real and predicted pairs Learn separate functions for various classes of incidents: No incidents, rain, snow, accident, road work, etc
Other R&D Efforts Predicting model can be used: Effective traffic data-mining tool Compression of traffic data Querying/matching capabilities “Probe” data integration project
Other R&D Efforts “Probes” are actual moving vehicles GPS data: latitude, longitude, heading, speed Proposed new algorithm for travel-times Calculus-based Can handle constantly moving sensors Coverage by “probes” is very sparse e.g. average 6 “probes” / 20 min on entire I-76
Other R&D Efforts Try to build “general trend” function Assume traffic is periodic delay time Monday #4 Monday #3 Monday #2 Monday #1
Q&A
Are These Patterns Similar? time delay time delay (x4,y4) (x2,y2) (x1,y1) (x3,y3)
Are These Patterns Similar? time delay time delay time delay distance = area between two pattern plots
Data & CPU Requirements For Philadelphia: Predicting time: Using 3 months of historical data, prediction update takes less than 5 seconds to compute System Memory: Predicting engine with 3 months of history can fit in less than 100 Mb DB Storage: 3 months of history needs ~ 50 Mb of DB storage
Predicting Engine’s Architecture Traffic Data History Collector Prediction Models Database Traffic Server Metro map with predicted values Save Prediction Model Real-time traffic data Predicting Engine Predicting Server (Philadelphia) Traffic Conditions History Prediction Model Pre-saved Predicting Server (Philadelphia) Predicting Server (New York) Prediction Model Interface Predicting Server (Los Angeles) Prediction Model Implementation
Mondays of August 2005
Mondays of August 2005
Mondays of August 2005