# Meander Structure Analysis Techniques Using Artificial Neural Networks
## 2 Materials and Methods
### Structure of the Feedforward Neural Network  
A multilayer feedforward neural network (FFNN) was used for the prediction of \(t_{\text{d}}\), \(S_{21}\), and \(S_{11}\). The general FFNNN network description equation is as shown in Equation (1):  
\[z(x)=(\sum_{i=1}^{m}w_{i}\times x_{i})+b, \tag{1}\]  
where \(w\) is a random weight, \(x\) is the input value, \(b\) is a random bias, \(m\) is the number of neurons in the previous layer, and \(i\) is an index representing the individual input connections to the neuron from the previous layer. In our case, the input vector consisted of \(x=[L_{\text{c}},N,l,2a,c,f]\) for the parameters.  
The sigmoid activation function was used for all hidden layers (Equation (2)). The linear activation function was used in the output layer. The sigmoid function is described by the following equation:  
\[g(z)=(1/(1+e^{-z})), \tag{2}\]  
where \(z\) is a real-valued number in the input to the sigmoid function which can be positive, negative, or zero, and \(g(z)\) is the output of the sigmoid function, which is also a real-valued number which shrinks the input \(z\) into a range between 0 and 1.  
Three separated FFNN networks were selected in order to predict \(t_{\text{d}}\), \(S_{21}\), and \(S_{11}\) separately according to our collected dataset of geometrical dimensions and electrodynamical characteristics of MSs. The reason for this is that the FFNN network cannot learn correctly how to predict 3 quite different \(t_{\text{d}}\), \(S_{21}\), and \(S_{11}\) characteristics at the same time.  
The input layer of each selected FFNN had 6 neurons to provide \(L_{\text{c}}\), \(N\), \(l\), \(2a\), \(c\), and \(f\) for the FFNN network. Each FFNN consisted of one neuron in the output layer in order to separately predict \(t_{\text{d}}\), \(S_{21}\), or \(S_{11}\). The prediction of \(t_{\text{d}}\) was performed with a (6-9-11-1) structure for the FFNN network, where there were two hidden layers with approximately 9 and 11 neurons. The (6-9-11-1) structure of the FFNN network for the prediction of \(t_{\text{d}}\) is provided in Figure 3.  
The prediction of \(S_{21}\) was performed with a (6-9-16-1) structure due to the completely different dataset used in comparison with \(t_{\text{d}}\). The same (6-9-16-1) FFNN structure was used to predict \(S_{11}\).  
The optimal structure of the FFNN network was discovered by evaluating the smallest MSE of the validation data. The selected structure for the FFNN for the prediction of \(t_{\text{d}}\) yielded \(2.23\times 10^{-5}\) for the MSE value. The selected structures for the FFNN for the prediction of \(S_{21}\) and \(S_{11}\) yielded MSEs of 0.086 and 8.618, respectively.  
The structure of each FFNN were selected by taking into account the recommendation to use systematic experimentation in order to discover the appropriate structure for the neural network for each dataset. The determination of the number of hidden layers and the number of neurons in each hidden layer was conducted empirically by changing the number of hidden layers from 1 to 2, with the number of neurons in each hidden layer ranging from 0 to 21.  
During the empirical investigation of different training methods, the Levenberg-Marquardt training method was chosen for further research. The Levenberg-Marquardt method is especially effective for training feedforward neural networks with a few hidden layers and is commonly used for regression problems. The MSE was employed as the loss function. Evaluation of the training methods for the FFNN network was performed with test data.