This package was created in order to create neural network models to predict the traffic status in urban areas. There are functions for properly formulating the data, training the neural network and predicted the wanted variable. This document introduces you to TrafficBDE’s basic set of tools.
The user should use only the
loadData and the
kStepsForward functions. The first one to load the
historical data and the second for the computation of the predicted
In order to install TrafficBDE, you should use the following code.
The input dataset of the main function could be a link, a csv, an excel file. There are different parameters that a user could specify and interact with the results. The parameters: “path”, “Link_id”, “direction”, “datetime”, “predict” and “steps” should be defined by the user, to form the dataset. Then an automated process formulates the data in order to provide the prediction of the wanted variable for the desired time and road.
|path||The path containing the historical data|
|Link_id||The Link_id of the road|
|dimension||The dimension of the road|
|datetime||The date time for the pediction. The format of the datetime should be ‘%Y-%m-%d %H:%M:%S’|
|predict||The argument to be predicted, appropriate values: “Mean_speed”, “Entries”, “Stdev_speed”|
|steps||How many steps forward the prediction will be|
The output of this process is a matrix with the predicted and real values and the RMSE. The rows are equal to the steps.
Simple examples the
kStepsForward function are provided,
in order for the user to understand the use and how to deal with these
The sample of the dataset that is being used is available in TrafficBDE package and represents the traffic fload of the road with Link_id: “163204843”, for January 2017.
The first example provides, in one step, the prediction of the Mean speed at 14:00 on 27 Jan. 2017
library(TrafficBDE) <- X163204843_1Data
kStepsForward(Data = Data, Link_id = "163204843", direction = "1", datetime = "2017-01-27 14:00:00", predict = "Mean_speed", steps = 1)
The second example provides, in one step, the prediction of the Entries at 20:00 on 15 Jan. 2017
kStepsForward(Data = Data, Link_id = "163204843", direction = "1", datetime = "2017-01-15 20:00:00", predict = "Entries", steps = 1)