# Meta-Extreme Learning Machine for Short-Term Traffic Flow Forecasting
## 2 Methodology
### ABC-ELM for the Traffic Flow Forecasting  
Because the input weight matrix and hidden layer bias of extreme learning machines are generated randomly in traditional extreme learning machines, if some values of input weights or hidden layer biases are 0 during the process of random assignment, the hidden layer nodes will be invalid. Thus, in some practical applications or large-scale training that needs a lot of nodes of hidden layers to ensure forecasting accuracy, it is difficult to ensure that so many hidden layer nodes achieve the expected accuracy. Moreover, when dealing with the samples that do not appear in the training process, a traditional extreme learning machine has insufficient generalization ability [46]. The traditional extreme learning machine model with randomly taken parameters brings limitations, yet there is room for optimization. To address this limitation, we propose an artificial bee colony algorithm to find the optimal network parameters for the ELM traffic flow prediction model. We use the artificial bee colony algorithm to continuously iterate to find the optimal solution. We construct and integrate the ABC framework to find the optimal input weight matrix and hidden layer bias for ELM in an iterative approach, which is called ABC-ELM in the following. Then, we find the optimal solution of the parameters of ELM by calculating the mean absolute percentage error (MAPE) and root mean square error (RMSE) in each iteration of the ABC algorithm. After that, we compare the performance of previous iterations and validate the performance of the ABC-ELM framework by cross-sectional comparison with other models. The workflow of the ABC-ELM is shown in Figure 2.  
At the beginning of the algorithm, we performed initialization operations, including building the ELM network and initializing the ABC algorithm. First, for the ELM part, there are two main parameters to be initially selected, the activation function \(f_{(}x)\) and the number of nodes in the hidden layer \(k\). The higher the number of nodes matrix, the more accurate the prediction result is. An increase in the number of nodes also increases the training cost, and the activation function uses the sigmoid function. Secondly, for the artificial bee colony algorithm, we specify the solution space size, upper and lower boundaries of the decision variables, maximum number of iterations, colony size, etc. The solution space size is determined by the ELM input matrix \(W\) and the implicit layer parametric matrix \(B\). Here, we set the size of the solution space to \(k\times N\). Because the shape of \(W\) is \([k,N]\) and the shape of \(B\) is \([k,1]\), we compress both into a column vector with the shape \([k\times N,1]\), where \(N\) is the number of training samples, and \(k\) is the number of nodes in the hidden layer of ELM. The pseudo-code of ABC-ELM is shown in Algorithm 2. ```
1:Initialize the ELM network;
2:Set activation function f(x) and the number of hidden nodes k;
3:Initialize the Artificial Bee Colony;
4:Determine colony size \(n\), the maximum of iterations \(I\), the upper bound of abandon \(L\) and the acceleration coefficient upper bound \(a\);
5:Data pre-processing;
6:Input the processed samples;
7:while termination conditions do
8:for each \(i\in[1,\,I]\)do
9:for each \(i\in[1,\,n]\)do
10: Recruited Bees Stage;
11: finding new positions randomly;
12: evaluation;
13: calculate fitness values and selection probabilities;
14:endfor
15:for each \(i\in[1,\,n]\)do
16: Onlooker Bees Stage;
17: finding new positions with roulette algorithm;
18: evaluation;
19:endfor
20:for each \(i\in[1,\,n]\)do
21: Scout Bees Stage;
22: Discard more than \(L\) honey source and search for new;
23:endfor
24: Update and store best solution ever found;
25:endfor
26:endwhile
27:Get input weight \(w\) and hidden layer bias \(b\);
28:Calculate output weight \(\beta\) of hidden layer;
29:Test and Error calculation;
```  
**Algorithm 2** ABC-ELM  
Figure 2: The workflow of ABC-ELM includes data pretreatment, ELM module, and ABC module.