## 4 Model Development
### Developing ANN Model and Generating New Datasets  
The ANN is a class of machine learning techniques implemented widely for estimating and solving various engineering problems with a high accuracy rate of predictions [17; 25; 45; 46; 47; 48]. A typical layout of an ANN model is a multi-layer feed-forward framework of input, hidden, and output layers that are successively connected by calibrated links called weights. The input layer comprises several neurons corresponding to the independent variables in the model, while the output layer includes a neuron corresponding to the dependent variable. The hidden layer contains a number of neurons that are typically determined by the trial-and-error method, as they play an essential role in determining the model's accuracy and complexity. The ANN architecture also contains constant values known as biases that adjust the overall output of each neuron within the hidden and output layers. This study used the ANN toolbox in Matlab R2022b [49] to develop a shallow ANN model. Four independent variables (Ab%, F%, AC%, and Va%) were employed as predictors in the input layer to predict the RSI. The model was trained using 75% of the data and tested with the rest through the Bayesian regularization algorithm to ensure the model's generalization and avoid overfitting. This algorithm was selected because it is a robust method with a better generalization process and difficulty in overtraining and overfitting the data, capable of providing an optimal model of a small-size dataset [50; 51]. Four neural network iterations with different numbers of hidden neurons (i.e., one, two, three, and four) were conducted to determine the desired number of neurons that provide a high level of accuracy and very low and stable convergence of errors for the ANN model. The generated models were evaluated statistically based on the values of the Mean Squared Errors (MSEs) and the coefficient of determination (R\({}^{2}\)) for the training and testing datasets. Table 4 shows the results of the modeling runs. The results indicate that two hidden neurons were the optimal neuron size for the network, where consistent measures of very low MSE values and very high R\({}^{2}\) values were obtained for both datasets. In addition, the training process of the datasets with two hidden neurons reveals how well the obtained Mean Squared Errors (MSEs) were minimized for both datasets and stood at a stable level of convergence at epoch 26, as shown in Figure 3. A simple schematic representation of the ANN architecture is shown in Figure 4. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Neurons**} & \multicolumn{2}{c}{**Training Dataset**} & \multicolumn{2}{c}{**Testing Dataset**} \\ \cline{2-5}  & **MSE** & **R\({}^{2}\)** & **MSE** & **R\({}^{2}\)** \\ \hline
**1** & 1.4394 & 0.9479 & 3.952 & 0.8207 \\ \hline
**2** & 0.2251 & 0.9924 & 0.2067 & 0.9928 \\ \hline
**3** & 0.2191 & 0.9922 & 1.0653 & 0.9700 \\ \hline
**4** & 0.1667 & 0.9940 & 0.7394 & 0.9702 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Statistical measures of the network iterations. While the developed ANN model will be used to generate a new dataset for prediction, the overall performance of the model was evaluated statistically by calculating the mean absolute error (MAE), root-mean-square error (RMSE), coefficient of determination (R2) value, and the average \"experimental-to-predicted\" ratio of all datasets. The model resulted in very low errors of (0.383) and (0.470) for the MAE and RMSE, a very high R2 value of (99.19%), and an average ratio of (1.00). This verifies the high level of accuracy of the selected model. In addition, the sensitivity of the ANN model was evaluated by quantifying the relative importance and impact of the input variables in the network. The Garson algorithm technique [52] was used in this study for calculating the relative importance or contribution  
Figure 4: Layout drawing of the ANN model. Figure 3: Training process of the network using two hidden neurons.