# Prediction of Ship-Unloading Time Using Neural Networks
## 3 Related Methods
### Stochastic Configuration Networks
Save \(w_{L}\) and \(b_{L}\) in \(\text{W}\), \(\xi_{L}=\sum\limits_{q=1}^{m}\xi_{L,q}\) in \(\Omega\), respectively;
9. Else go back to step 4;
10. End If
11. End For (corresponds to Step 4)
12. If W is not empty
13. Find \(w_{L}\), \(b_{L}\)* that maximize \(\xi_{L}\) in \(\Omega\), and set \(G_{L}=[g_{1}\)*, \(\delta 2*,\ldots,g_{L}\)*];
14. Break (go step 18);
15. Else randomly take \(\tau\in(0,1-r)\), renew \(r\): \(r+\tau\), return to step 4;
16. End If
17. End For (corresponds to step 3) Phase 2: Output weights computation:
18. Obtain \(G_{L}=[g_{1}\)*, \(\delta 2*,\ldots,g_{L}\)*];
19. Calculate \(\beta^{*}=[\beta_{1}\)*, \(\delta 2*,\ldots,\)\(\beta_{L}\)*]\({}^{T}=G_{L}\)*:Y;
20. Calculate \(e_{L}=e_{L-1}-\beta_{L}\)*:Z;
21. Renew \(e_{0}\): \(-e_{L}\); \(L\): \(=L+1\);
22. End While
23. Return \(\beta_{1}\)*, \(\beta_{2}\)*, \(\ldots\), \(\beta_{L}\)*, \(w^{*}=[w_{1}\)*, \(w_{2}\)*, \(\ldots,w_{L}\)*], \(b=[b_{1}\)*, \(b_{2}\)*, \(\ldots,b_{L}\)*]. ### Evaluation Metrics

Three metrics RMSE, MAPE, and \(R^{2}\) are used to evaluate the performance of the proposed models, where RMSE is the root mean square error used to compare the prediction accuracy of different models, and MAPE is the mean absolute percentage error used to avoid positive and negative error cancellation on a prediction accuracy measurement. \(R^{2}\) is the coefficient of determination, the larger the better. All results are computed based on the average values over 100 independent trials. \[RMSE=\sqrt{\frac{1}{N}\sum\limits_{i=1}^{N}{\left(y_{i}-\hat{y}_{i}\right)^{2}}}, \tag{20}\]

\[MAPE=\frac{1}{N}\sum\limits_{i=1}^{N}{\left|\frac{\hat{y}_{i}-y_{i}}{y_{i}} \right|}, \tag{21}\]

\[R^{2}=1-\frac{\sum\limits_{i=1}^{N}{\left(\hat{y}_{i}-y_{i}\right)^{2}}}{\sum \limits_{i=1}^{N}{\left(y_{i}-\overline{y}_{i}\right)^{2}}}, \tag{22}\]

where \(y_{i}\) is the actual value of the sample, \(\overline{y}_{i}\) is the predicted value of the sample, \(\hat{y}_{i}\) is the mean of the actual values of samples, and \(N\) is the total number of samples. ## 4 Experimental Results

To evaluate the performance of the proposed models, we tested the influence of different structures and initial weights on the model performance, stability, convergence, and prediction accuracy of different models. Four datasets-DB1, DB2, DB3, and DB4 were selected for benchmarking, where DB1 and DB2 are single-input-single-output datasets, but DB3 and DB4 have multiple inputs and a single output. All datasets were divided into 70% as training sets and 30% as test sets. 1. DB1 \[f(x)=\sin(x)\cdot\cos(x).\]
2. DB2 \[\beta^{*}=\underset{\beta}{\text{argmin}}\|G_{L}\beta-Y\|^{2}=G_{L}^{+}Y, \tag{16}\]0
3. DB3 (stock) is a standard dataset for regression prediction from the KEEL website. The data is the daily stock prices of 10 aerospace companies from January 1988 to October 1991. The task is to predict the price of the 10 th company, given the prices of the rest of the companies. 4. DB4 (concrete) is a standard dataset for regression prediction from the KEEL website. The concrete compressive strength is a nonlinear function of age and ingredients. The task is to predict the concrete compressive strength. ### Network Structure

Network structure is critical for models based on neural networks. Different network architectures can significantly impact a model's performance. However, the network structure of a Stochastic Configuration Network (SCN) is determined by the algorithm itself and is not predetermined. Therefore, discussions regarding various network structures are relevant only to Backpropagation (BP) and Random Vector Functional Link (RVFL) networks. For the Backpropagation (BP) model, we have selected a double-hidden-layer architecture as the foundational structure, with a primary focus on determining the optimal number of nodes in each layer. The testing process is conducted repeatedly, varying thenumber of nodes in the two hidden layers, ensuring that the maximum number of nodes per hidden layer does not exceed 50.