# Time Series Prediction Based on Adaptive Weight Online Sequential Extreme Learning Machine
## 3 The Proposed Adaptive Weight Online Sequential Extreme Learning Machine
### Robot Arm Example  
In this subsection, the performance of AWOS-ELM and OS-ELM are compared on the identification problem regarding the dynamics modeling of a robot arm. The system input and output of this flexible robot arm are the measured reaction torque and the acceleration, respectively [27]. There are two attributes in this flexible robot arm example, and all of the 1024 pairs of data are described in Figure 2. In order to learn the model, the input and output of SLFN, \(\mathbf{x}_{i}\) and \(\mathbf{t}_{i}\), are respectively defined as \(\mathbf{x}_{i}=\left[u_{i},u_{i-1},u_{i-2},u_{i-3},u_{i-4},d_{i-1},d_{i-2},d_{i- 3},d_{i-4}\right]^{T}\) and \(\mathbf{t}_{i}=d_{i}\), where \(u_{i}\) and \(d_{i}\) are the measured reaction torque and the acceleration of this robot arm, respectively. Thus, the samples number is 1019. The training set contains the front 819 samples, and the rest of the 200 samples are used to test the network.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Data Sets** & \begin{tabular}{c} **Sigmoid Hidden** \\ **Mean** \\ \end{tabular} & \
\begin{tabular}{c} **Standard** \\ **Deviation** \\ \end{tabular} &
\begin{tabular}{c} **Mean** \\ **Deviation** \\ \end{tabular} \\ \hline Logistic & 0.7366 & 0.4403 & 0.7855 & 0.4080 \\ Mackey-Glass & 0.8750 & 0.3311 & 0.8748 & 0.3313 \\ Sunspot & 0.6440 & 0.4729 & 0.6447 & 0.4726 \\ Pseudo periodic synthetic series & 0.8726 & 0.3338 & 0.8592 & 0.3476 \\ Milk production & 0.8615 & 0.3435 & 0.9009 & 0.2959 \\ Electricity production & 0.8857 & 0.3152 & 0.9176 & 0.2741 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Performance comparison between AWOS-ELM and OS-ELM on benchmark data sets. RMSE, rooted mean squared errors.  
Figure 3 illustrates the relationship between the hidden nodes number and testing RMSE of the OS-ELM and AWOS-ELM algorithms. It shows that the OS-ELM and AWOS-ELM with low hidden nodes number have similar testing RMSE, and the testing RMSE of AWOS-ELM algorithm tends to be lower than that of OS-ELM when the hidden nodes number increases. It shows that the OS-ELM and AWOS-ELM with low hidden nodes number have similar testing RMSE, and the testing RMSE of the AWOS-ELM algorithm tends to be lower than that of OS-ELM when the hidden nodes number increases. When the number of hidden nodes is too small, the prediction accuracy of SLFN trained by the OS-ELM or AWOS-ELM algorithm is very low. As described in Equations (17) and (18), the computing adaptive weight depends on the prediction value. If the prediction accuracy is too low, the AWOS-ELM cannot differentiate the low confidence data and normal data very well. Thus, in Figure 3, the performance of AWOS-ELM is similar to or even slightly less than that of OS-ELM when the hidden node number is low. In order to be fair for the sake of comparison, the hidden nodes number is set to be 45, which can guarantee that the algorithms with sigmoid function or RBF function both have fine performance levels. Figure 4 illustrates the identification effectiveness of the flexible robot arm dynamics modeling problem, and we can easily find that the AWOS-ELM algorithm has higher prediction accuracy than OS-ELM algorithm no matter whether considering the sigmoid function case or RBF function case. Table 3 showcases that the proposed AWOS-ELM algorithm and OS-ELM algorithm have similar training time and standard deviation values, implying the similar learning speed and stability, and that the AWOS-ELM algorithm has lower RMSE than the OS-ELM algorithm, which implies better generalization performance and higher prediction accuracy.  
Figure 3: Relationship between testing RMSE and hidden nodes number. (**a**) Sigmoid node; (**b**) RBF node.  
Figure 2: Flexible robot arm attributes. (**a**) System input; (**b**) system output.