# Developing a Library of Shear Walls Database and the Neural Network Based Predictive Meta-Model
## Modeling the Network  
### Number of Neurons  
When the desired performance of the network is accomplished, the learning process ends. On the other hand, the number of optimal neurons required for each layer is not known beforehand, and it is usually determined by trial and error. The constructive approach is used to overcome this problem. This method finds the smallest network that can provide the required performance, and is suitable for passing local responses (or local minima); however, it is time consuming [55]. Empirical research has been performed to determine the optimal number of neurons [56]. A summary of this research is presented in Table 3. The results of this table can be used to determine the range of changes in the  
Figure 1: Dimensions of a generic shear wall. (**a**) SPSW, (**b**) RCSW.  
number of the optimal neurons, and also is a limit for the interval of trial and error. As can be seen, the number of neuron in the hidden layer range from 2 to 39. The network's MSE value is computed for each number of neurons in the hidden layer, while other parameters are kept constant.  
Figure 2 shows the performance of the network based on MSE for train and test data as a function of number of neurons. Each ANN model (with particular number of neurons) was iterated 10 times and its mean was used to increase the accuracy of the model. The mean errors for each neuron is also summarized in Table 4. The best performance among the train and test data for SPSW belonged to the network with 6 neurons, i.e., ANN 12-6-1, where the first, second and third digits are the number of input nodes, hidden neurons, and output nodes, respectively. On the other hand, ANN 13-10-1 had the best performance for RCSW.  
\begin{table}
\begin{tabular}{l l l l} \hline \hline
**Reference** & **Criteria for Neuron of Hidden Layer** & **SPSW** & **RCSW** \\ \hline [PERSON] [57] & \(\leq\)2\(N_{i}\) & \(\leq\)24 & \(\leq\)26 \\ [PERSON] [58] & 3\(N_{i}\) & 36 & 39 \\ [PERSON] [59] & \(\frac{N_{i}+N_{o}}{2}\) & 6.5 & 7 \\ Gallant and Gallant [60] & 2\(N_{i}\) & 24 & 26 \\ [PERSON] [61] & \(\frac{2N_{i}}{3}\) & 8 & 8.6 \\ [PERSON] [62] & \(\sqrt{N_{i}+N_{o}}\) & 3.6 & 3.7 \\ [PERSON] [63] & \(\frac{N_{o}N_{i}+0.5N_{o}\times(N_{o}^{2}+N_{i})-1}{N_{o}+N_{i}}\) & 1.3 & 1.35 \\ [PERSON] et al. [64] & \(\left(\frac{\sqrt{8N_{i}+1}}{2}\right)-2\) & 2.9 & 3.1 \\ [PERSON] and Tateishi [65] & \(N_{i}+1\) & 13 & 14 \\ [PERSON] and Serra [66] & \(N_{i}\) & 12 & 13 \\ [PERSON] [67] & \(N_{i}+N_{o}\) & 13 & 14 \\ [PERSON] [68] & \(\ln(N_{i})\) & 2.4 & 2.5 \\ [PERSON] et al. [69] & \(\frac{N_{i}+N_{o}}{2}\) & 6.5 & 7 \\ [PERSON] [70] & \(\frac{2N_{i}}{3}+N_{o}\) & 9 & 9.6 \\ [PERSON] et al. [71] & \(\frac{2^{N_{i}}}{N}+1\) & 14.6 & 3 \\ [PERSON] [72] & \(\sqrt{(N_{o}+2)N_{i}}+2\sqrt{\frac{N_{i}}{(N_{o}+2)}}\) & 10 & 10.4 \\ [PERSON] and [PERSON] [73] & \(N_{i}+\sqrt{N}\) & 29 & 76 \\ [PERSON] [74] & \(\frac{(N_{i}+N_{o}+1)}{2}\) & 6 & 6.5 \\ [PERSON] and [PERSON] [75] & \(\sqrt{N_{o}N_{i}}\) & 3.4 & 3.6 \\ [PERSON] et al. [76] & \(N_{i}+1\) & 13 & 14 \\ [PERSON] and [PERSON] [77] & \(\frac{4N_{i}^{2}+3}{N_{i}^{2}-8}\) & 4.2 & 4.2 \\ \hline \hline \end{tabular}
\end{table}
Table 3: A survey on number of the hidden neurons.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \multicolumn{2}{c}{**SPWS**} & \multicolumn{2}{c}{**RCSW**} \\ \cline{2-5}
**Neurons** & \begin{tabular}{c} **Train** \\ **Data** \\ \end{tabular} & \begin{tabular}{c} **Test** \\ **Data** \\ \end{tabular} & \
\begin{tabular}{c} **Train** \\ **Data** \\ \end{tabular} &
\begin{tabular}{c} **Test** \\ **Data** \\ \end{tabular} \\ \hline  
\hline \hline \end{tabular}
\end{table}
Table 4: Mean MSE for train and test data as a function of number of neurons.  
Figure 2: The network’s neuron-dependent MSE. (**a**) SPSW; train data, (**b**) SPSW; test data, (**c**) RCSW; train data, (**d**) RCSW; test data.