Research Article
Online Traffic Accident Spatial-Temporal Post-Impact Prediction Model on Highways Based on Spiking Neural Networks
Algorithm 1
Mean-shift clustering of clean-up time.
(1) | Input | (2) | dataset of clean-up time over which the procedure is performed | (3) | Initialization | (4) | the radius of a region | (5) | the minimum distance between clusters | (6) | probability that point belongs to Cluster | (7) | Repeat | (8) | Randomly select an unvisited point from the dataset as the starting centre point | (9) | Repeat | (10) | Find all the points that appear in the circle and group into cluster | (11) | For point in , | (12) | Calculate the shift vector of as | (13) | Update towards the shift vector as | (14) | Until reaches minimum threshold | (15) | If , then merge and | (16) | Else, label as a new cluster | (17) | Until all points are visited | (18) | For point in , belongs to cluster with maximum probability | (19) | Output | (20) | all clusters | (21) | clusters that each point in belongs to |
|