# Assessing the Seismic Demands on Non-Structural Components Attached to Reinforced Concrete Frames
## 6 Artificial Neural Network (ANN) Model  
Artificial neural networks (ANNs) are assisting in the resolution of a wide range of engineering issues [46; 47]. ANNs are expressed mathematically as a simplified model analogous to biological neural networks. Neural networks can evaluate enormous volumes of data and deal with complex and confusing situations. As a result, neural networks are often a better calculation and prediction tool than classic computation approaches [48]. Researchers all over the globe have effectively employed neural networks in the subject of structural dynamics [8; 49; 50; 51]. Hence, in this study, a feed-forward neural network with two layers is used to predict the CDAF spectrum accurately. The hidden layer is one of two layers, the other being the output layer. Neural networks with only one hidden layer may precisely approximate any function [52]. The vibration period (\(T=0\) to \(2\) s with \(0.01\) interval) and damping ratio (\(\xi_{NS}\)) of the NSC, soil type (S), where S = 0, 1, and 2 for Soil A, B, and C, respectively, and floor level are considered as inputs for the model. The CDAF values represent the model's expected output. The network's architecture has a more significant influence on the model's performance. The optimum number of hidden neurons is identified based on the minimum \(MSE\) (mean squared error) of the output. The \(MSE\) is defined as per Equation (9) as follows:  
\[MSE=\frac{\sum\bigl{(}Y_{s}-Y_{p}\bigr{)}^{2}}{n} \tag{9}\]  
where \(Y_{s}\) and \(Y_{p}\) are the simulated and predicted outputs, and \(n\) is the number of data points. Figure 15 shows the variation of \(MSE\) with the number of hidden neurons. The figure shows that the lowest \(MSE\) is attained with 17 hidden neurons. Thus, the ANN 4-17-1 model (Figure 16) was developed by taking into consideration the 17 neurons in the hidden layer. A suitable learning strategy must be developed to train the hidden neurons. The Levenberg-Marquardt (LM) back propagation (BP) technique is used to train the network. Furthermore, the Tan-sigmoid transfer function is used in both the hidden and output layers. The neural network model in this study was created on the MATLAB R2019b environment. In total, 24120 CDAF values were simulated for each building model in this study corresponding to 201 vibration periods of NSC, 8 damping ratios, 3 soil types, and 5 floor levels. The dataset is further randomly subdivided into 3 sections: training (70% of the total dataset), validation (15% of the total dataset), and testing (15% of the total dataset). Before training, the entire dataset must be preprocessed. The dataset must be normalized between -1.0 and 1.0 in order to provide equal weightage to the variables. This normalization can be conducted using Equation (10):  
\[X_{n}=\frac{2(X-X_{min})}{(X_{max}-X_{min})}-1 \tag{10}\]  
where \(X_{n}\) is the normalized value, and \(X_{max}\) and \(X_{min}\) are the maximum and minimum values of the variable \(X\). The prediction capability of the ANN model is evaluated by defining the performance measurement functions. The coefficient of correlation (\(R\)) and mean square error (Equation (9)) are two performance measuring functions used in this study. The following is a definition of the coefficient of correlation (Equation (11)):  
\[R=\sqrt{\frac{\sum Y_{s}^{2}-\sum\bigl{(}Y_{s}-Y_{p}\bigr{)}^{2}}{\sum Y_{s}^ {2}}} \tag{11}\]The results of the model's performance are shown in Table 6. The \(R\) value should be as high as possible, and the error (\(MSE\)) should be minimal. Figures 17 and 18 show the correlation between the simulated and predicted CDAF of regular and irregular building models. These figures show that all simulated data points are close to the 45-degree line. The 45-degree line represents the residual-free line (i.e., predicted data = simulated data). The predicted data are obtained by the prediction model (ANN), whereas the simulated data are generated using the approach described in Section 5.4.