This project enables the prediction of signal phase timing (SPaT) in fixed and adaptive environments by using a combination of machine learning techniques and historical traffic data.
It has been developed to support a dissertation titled "A study of machine learning algorithms and their suitability for predicting traffic signal timing" towards an MSc in Software Engineering at the University of Oxford.
- Takes historical traffic controller signal phase and detection data to create datasets suitable for machine learning analyses
- Enables feature extraction from data to provide signal state and phase duration
- Implements the Classification and Regression Tree (CART) for SPaT prediction.
- Implements Recurrent Neural Network with Long Short-Term Memory for SPaT prediction.
- Supports the creation of plots for data analysis
The software has been divided into five packages:
- Pre-Processing: processes the data in the expected format, creating datasets for usage with Decision Tree and Neural Network model creation
- Analysis: manipulates the data for analysis, creating plots for further understanding
- Decision Tree: implements the Classification and Regression Tree (CART) algorithm and Gradient Boosting Regression (GBR) ensemble algorithm to predict SPaT
- Neural Network: implements a Recurrent Neural Network (RNN) using Long Short-Term Memory (LSTM) to predict SPaT
- Tools: provides a number of helper functions that are re-used throughout the other packages
The application makes use of two types of data.
Data generated by the Siemens IC4 Tool's Emulator can be provided to the PreProcessing module for formatting into the suitable historical traffic data used for the learning and prediction processes.
For information on the application itself and the data format it produces, please read the Siemenshandbook.
The prediction engine takes historical traffic data in three comma-separated (CSV) four formats to create the learning models.
Format ID | Description | Used in |
---|---|---|
1 | Timestamped phase/stage with detection I/O state information | RNN LSTM |
2 | Timestamped phase/stage with detection I/O state information (numerical values only) | CART/GBR |
3 | Timestamped phase/stage without detection I/O state information (numerical values only) | CART/GBR |
4 | Dated phase/stage with start/end times and duration information (numerical values only) | CART/GBR |
Notes:
- 1 and 2 differ simply in terms of data presentation (with 2 only using numerical values due to limitations with the platform used).
- Examples of the data in the 4 formats as above are included in the project (within the 'data' folder).
The following versions (or newer) are required to run SPaT Prediction:
- Keras - v2.0.3
- matplotlib - v2.0.2
- NumPy - v1.13.1
- Pandas - v0.20.3
- Python - v3.5.2
- seaborn - v0.8
- scikit-learn - v0.19.0
- TensorFlow - v1.0.0
- Priscilla Nagashima Boyd - priscillaboyd
This project is licensed under the Apache Licence 2.0 - see the LICENSE file for further information
If you use SPaT Prediction, we would appreciate a citation ๐ :
A study of machine learning algorithms and their suitability for predicting traffic signal timing, Nagashima Boyd, P., University of Oxford, 2017.