## 5 Forecasting Results
 \tag{12}\]  
The time complexity for the initialization of the fireflies is \(O(SN)\); where the \(SN\) is the maximum size of the population in FFA. The time complexity for calculating the fitness values is \(O(SN)\); the time complexity for updating the light intensity extreme value is \(O(SN)\); the time complexity for selecting the best firefly extreme value is \(O(SN)\). Therefore, the worst time complexity of FFA for one iteration is: \(O(SN)+O(SN)+O(SN)+O(SN)\), which can be simplified as \(O(\text{FFA})=O(SN)\). The fixed population size (\(SN\)) is only considered to have an influence on the time complexity for DRBM-FFA, MLP-FFA and ARIMA-PSO models. The overall computational complexity of an RBM depends on number of hidden units, number of the data points and number of output nodes. Additionally the computational complexity of RBM for the sequential searching takes \(f(T)\) times to get the subset of failed patterns in the best case. Therefore, the final computational complexity of the proposed method is as follows:  
\[O(\text{RBM},\text{FFA})=O(SN+(f(T)+f(T)\times n_{h}+o)) \tag{13}\]  
where, \(T\) is the number of data points, \(n_{h}\) is number of hidden nodes, \(o\) is the number of output nodes. For the MLP-FFA model, the computational complexity of an MLP depends on hidden nodes, number of outputs, and the number of training samples \(t\). Given the computational complexity of FFA is \(O\) (\(SN\)), the final computational complexity of the (MLP-FFA) is as follows:  
\[O(\text{MLP},\text{FFA})=O(SN+(t(h+o))) \tag{14}\]  
Figure 10: Average of standard deviation. where \(t\) is the number of training samples, \(h\) is number of hidden nodes, \(o\) is the number of output nodes. For the ARIMA-PSO model, the measure of complexity depends on the order values for \(p\) and \(q\) in ARIMA, and the time complexity of PSO algorithm. For the PSO algorithm, the time complexity can be obtained as follows: The time complexity for the initialization of the particle swarm is \(O(SN)\); the time complexity for calculating the fitness values is \(O(SN)\); the time complexity for updating the individual extreme value is \(O(SN)\); the time complexity for selecting the best individual extreme value is \(O(SN)\); the time complexity for updating the velocities and positions is \(O(SN)\). Therefore, the worst time complexity of PSO algorithm for one iteration is: \(O(SN)+O(SN)+O(SN)+O(SN)+O(SN)\), which can be simplified as \(O(PSO)=O(SN)\). The time complexity for ARIMA (\(p\), \(d\), \(q\)) depends on both \(p\) and \(q\) values [50]. Computation of AR and MA coefficients thus takes \(O((N-p)\)\(p2)\) and \(O((N-q)\)\(q2)\) time, respectively, where \(N\) is the length of historical values. So, the total time of the ARIMA model is as follows:  
\[O(\text{ARIMA})=O\Big{(}(N-p)\times p^{2}+(N-q)\times q^{2}\Big{)} \tag{15}\]  
We can easily see that the complexity of ARIMA grows significantly as we consider higher order values for \(p\) and \(q\). Therefore, the final computational complexity of the (ARIMA-PSO) is as follows:  
\[O(ARIMA,PSO)=O\Big{(}SN+(N-p)\times p^{2}+(N-q)\times q^{2}\Big{)} \tag{16}\]  
It can be concluded that \(O(\text{ARIMA})\) > \(O(\text{ARIMA},\text{PSO})\) > \(O(\text{MLP},\text{ FFA})\) \(\simeq\) (DRBM, FFA) which suggests that the hybrid approaches give an improvement in both the training and prediction process. The effect of scalability on the computational complexity of the DRBM-FFA algorithm was also analyzed. For this purpose, time complexity of the DRBM-FFA algorithm for solving the Rosenbrock function with different dimensions was calculated as described in [51]. The Rosenbrock function was selected because it interacts between the candidate algorithms parameters. To establish the time complexity, an after-code execution time \((T_{0})\) and the execution time of Rosenbrock function for 200,000 evaluations \((T_{1})\) were measured and the mean of five execution times for DRBM-FFA on the Rosenbrock function using 200,000 evaluations \((\hat{T}_{2})\) was measured.