Predicting spatio-temporal
traffic patterns from sensor data
Felix Kunde
Slides: https://slides.com/fxku/phd
3rd PhD Colloquium of the DGK Section on Geoinformatics and the DGPF Working Group on Geoinformatics
About me
About Beuth HS
- Founded 1971 as Technische Fachhochschule (TFH)
- Located in wild wild Wedding
- 12.000 students
- Widest range of degree courses in applied engineering in Berlin and Brandenburg
- Hosted the german FOSS4G in 2014
Arbeitskreis Data Science
- Joint group of Profs from Math, Machine Learning, Computer Vision, Databases, Text Mining, Geotemporal Data Mining
- Regular PhD Colloquiums and Journal Clubs
PhD Endeavor
- Start of PhD? - Summer 2016
- Internal Supervisor - Prof. Dr. Petra Sauer
- External Supervisor - Not yet
- Success
- Participated at SIGSPATIAL GISCUP 2016
- Talk & Workshop @ FOSS4G Bonn 21.-28.08.16
- Talk @ WhereCamp, BeuthHS 03.-04.11.16
- Accepted Short Paper @ BIGQP: 1st International Workshop on Big Geo Data Quality and Privacy - Co-located with EDBT 2017, Venice - 22.-24.03.17
- Accepted Full Paper @GIS Ostrava 2017 - 22.-24.03.17
- Accepted Talk @ FOSSGIS 2017, Passau - 22.-24.03.17
Project
- Funded by German government and DLR
- Goal: Build up a mobility service plattform
- Addressing small companies
- Crowdsource traffic related data
- Explore / extend spatial data mining tools
Mobility Stack
Mobility Stack
- Processing sensor streams
- Calculate travel times
- Predict traffic states
- Route optimization
- Smart scheduling
Topic of my talk - TL;DR
- Context: Transportation research
- Task: Traffic forecasting
- Problem: Hardly used in the field
- General question: What works best?
- My interest: Spatio-temporal correlations
- Methods: Machine learning on time series
Context
- Project data is related to traffic in Dresden
- Sensor measurements (e.g. inductive loops)
- Floating Car Data
- Origin: VAMOS ITS (intelligent transportation system)
Problem definition
- Many ITS do only traffic monitoring
- Rule-based systems reacting to current traffic
- Great uncertainty in traffic messages
Travel time to incident in min
Correctnes of message in %
Pape, S. & Körner M. (2016). Verkehrslageprognose unter Berücksichtigung der dynamischen Kapazitäten an LSA-abhängigen Knotenpunkten zur qualitativen Aufwertung der Verkehrslageinformation im Verkehrsmanagementsystem VAMOS. 25. Verkehrswissenschaftliche Tage 16. und 17. März 2016 in Dresden. (in german)
Tasks
- Predict future measurements at static sensors
- Predict travel times for trajectories
- Predict anomaly patterns (e.g. congestion)
Relation between macroscopic measures
Speed
Flow (Occupancy)
Density
Treiber, & Kesting (2013): Traffic Flow Dynamics - Data, Models and Simulation. Springer. 26.
Theory
Free Flow vs. Congestion
https://www.civil.iitb.ac.in/tvm/1111_nptel/512_FundRel/plain/plain.html
Speed-Flow Diagram
http://www.cl.cam.ac.uk/~rg31/research/
Temporal Dependency
Waterloo, S. (2017): Analyse und Bereinigung unvollständiger und fehlerhafter Messreihen von Verkehrssensoren. Betreute Bachelor-Thesis.
Occupancy
Extracted Season
Temporal Dependency
Waterloo, S. (2017): Analyse und Bereinigung unvollständiger und fehlerhafter Messreihen von Verkehrssensoren. Betreute Bachelor-Thesis.
Autocorrelation
Stationarity
Spatial Dependency
Pfeifer, P.E. & Deutsch, S.J. (1981): Seaosonal Space-Time ARIMA Modeling
Adjacency Matrix
s1 | s2 | s3 | s4 | s5 | s6 | s7 | s8 | ... | |
---|---|---|---|---|---|---|---|---|---|
s1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | ... |
s2 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | ... |
s3 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | ... |
s4 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 1 | ... |
s5 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | ... |
s6 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 1 | ... |
s7 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | ... |
s8 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | ... |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
How to do it?
- Exponential smooting, moving average
- Autoregressive time series models (e.g. ARIMA)
- kNN search on historic data
- Baysian Networks
- Support Vector Machines (SVM)
- Artificial Neural Networks (ANN)
What works best?
- Hard to say. Papers usually favor one approach.
- How important are non-linear patterns?
- How is the performance & scalability?
- Does it work for a whole city?
- Do we need a combination of different methods?
So what is Deep Learning?
- It's Machine Learning with neural networks
- "Deep" reflects the anatomy of these nets
- Mostly supervised learning
- Ideal for fuzzy data (images, audio, text)
- Outperfoms other approaches
- New easy-to-use frameworks for DL
Yes, it's a hype
Images
Convolutional Nets
(c) Fjodor Van Veen, Asimov Institute
Input Cell
Kernel
Convolutional
Hidden Cell
Output Cell
Memory Networks
=
The entire net repeated and interconnected
Sequences?
Single values (many-to-one)
Sequences (many-to-many)
Daytime? Weekday? Holiday? Weather? Events?
Location?
Spatio-temporal traffic forecasts with neural networks
- Abdulhai et al. (1999)
- Ishak et al. (2003)
- Van Lint et al. (2005)
- Vlahogianni et al. (2007)
- Leonhardt (2008)
- Zeng & Zhang (2012)
- Lv et al. (2014)
- Polson et al. (2015)
- Ma et al. (2015)
- Zhang et al. (2017)
- and many more ...
Test Data
- ~ 130 inductive loops (speed, occupancy etc.)
- 9 years of data (atm testing only 1 month of 2014)
- 80% training, 20% test
Time Series
Workflow
- Take moving average from each sensors as input ...
- ... to predict a future value for one sensor
- 5, 10, 15, 30, 45 minutes offset to predict
- Narrow down to neighbours (sparse input matrix)
- Feed input vectors into network randomly
Isochrones
Test Setup
- Network: Feed Forward
- Layers: 1 input, 1 hidden, 1 output
- Activation Function: Sigmoid
- Optimization: Stochastic Gradient Descent
- Loss Function: RMSE
- Other Hyperparams:
- n Neurons = 60 (sensors)
- Learning rate = 0.01
- Batch Size = 20
-
Iterations = 10000
- n Neurons = 60 (sensors)
Feed Forward NN Inputs
- FFNNsingle fed only with target sensor
- FFNNNN fed only with neihbours of target sensor
- FFNNNN+ fed with neighbours incl. target itself
- FFNNall fed with values from all sensors
FFNN mimicing RNNs
- Included sequence information into input by appending the input matrix (idea from Polsen et al. 2015)
- mFFNNsingle fed only with target sensor
- mFFNNNN fed only with neihbours of target sensor
- mFFNNNN+ fed with neighbours incl. target itself
- mFFNNall fed with values from all sensors
Results
Results
Results
MA = 15 Min; Sequence Size = 10 time steps
Results
MA = 15 Min; Sequence Size = 5 time steps
Not there yet ...
- Results are a little "too good". Why is that?
- MA is probably too big. Prediction task is too easy.
- What can we really say about spatio-temporal patterns?
- Why do neighbours not have a positive effect?
- How good is the prediction when anomalies occur?
Roadmap 2017
- Present existing results and idea DONE
- Create R package to repair missing data DONE
- How good are our results really?! WIP
- Use LSTM NN to learn sequences DONE
- Use trajectories instead of sensors TODO
- Let TU Dresden test it with realtime data TODO
- Create a web-service for ExCELL WIP
- Concept for continous learning TODO
- Compare Deep Learning Frameworks DONE
- Compare with STARIMA WIP
- Compare with SVM WIP
Thanks
Felix Kunde
Research Assistant, MAGDa
Beuth University of Applied Science
fkunde@beuth-hochschule.de
PhD endeavour
By fxku
PhD endeavour
Predicting spatio-temporal traffic patterns with Deep Learning
- 2,781