Mapping Bus and Stream Travel Time Using Machine Learning Approaches
Algorithm 1
Pseudo Code for implementation of GBM
(1)
Model Parameters: Number of trees (M), learning rate (J), variable interactions (C);
(2)
Input: [bus travel time, time of the day, day of the week, no. of bus-stops];
(3)
Output: [stream travel time];
(4)
Sequentially make the ānā number of trees:(a)Build the initial decision tree to predict the observations for all the in the training set.(b)Calculate loss at each step is calculated using the loss function, .(c)Calculate the negative gradient of the loss using (d)Predict the negative gradients of the loss functions using the set as the training data in subsequent decision trees.(e)Calculate the multiplier using the gradient value.(f)Build a final model that is an additive sequence of all the decision trees, as
(5)
For every in the test dataset: Use the final model to predict on the testing data, .