## 3 Methodology
### Development of the ANN Model  
This study utilizes a three-layer ANN model with a common structure consisting of an input layer, a hidden layer, and an output layer. While adding more hidden layers may improve the model's performance, it also raises the potential for overfitting when dealing with a small dataset. Guided by the principle of Occam's Razor, where simpler models are preferred due to their generalizability and lower risk of overfitting, this study employs a one-hidden-layer ANN model. The input layer of the model includes seven nodes, with each node representing an input parameter that has an impact on the settling velocity of the particles. In the output layer, one node represents the particle settling velocity. However, determining the optimal number of nodes in the hidden layer is not guided by any theory and relies mainly on experience. The architecture of the ANN model is illustrated in Figure 3.  
To train the ANN model for predicting settling velocity, we set the learning rate to 0.001 and used the mean squared error as the loss function. The hidden and output layers were activated using ReLU and Sigmoid functions, respectively. We trained the model for 1000 epochs to optimize its performance. In order to determine the optimal node number in the hidden layer, we minimized the difference between predicted and measured settling velocity. In our study, we indeed utilized K-fold cross-validation for training the model. Specifically, we employed 10-fold cross-validation, a standard machine learning approach, to ensure our model's robustness and generalizability. This method involved partitioning the dataset into ten equal-sized subsets. Each iteration used one subset as the \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Model Variables and Datasets**} & \multicolumn{5}{c}{**Statistical Parameters**} \\ \cline{2-6}  & \multicolumn{1}{c}{**Mean**} & \multicolumn{1}{c}{**Standard**} & \multicolumn{1}{c}{**Min**} & \multicolumn{1}{c}{**Max**} \\ \hline \multirow{2}{*}{Particle density (kg/m\({}^{3}\))} & Train set & 4961 & 2680 & 2171 & 7960 \\  & Test set & 5243 & 2680 & 2303 & 7960 \\ \hline \multirow{2}{*}{Particle equivalent diameter (m)} & Train set & 0.00678 & 0.001 & 0.00377 & 0.01594 \\  & Test set & 0.00665 & 0.001 & 0.00363 & 0.01594 \\ \hline \multirow{2}{*}{Sphericity} & Train set & 0.793 & 0.471 & 0.149 & 1 \\  & Test set & 0.792 & 0.471 & 0.140 & 1 \\ \hline \multirow{2}{*}{Settling area ratio} & Train set & 0.765 & 0.282 & 0.246 & 1.174 \\  & Test set & 0.749 & 0.282 & 0.234 & 1.174 \\ \hline \multirow{2}{*}{Fluid density (kg/m\({}^{3}\))} & Train set & 1098 & 1000 & 116 & 1250 \\  & Test set & 1088 & 1000 & 114 & 1250 \\ \hline \multirow{2}{*}{Consistency index (Pa-s\({}^{n}\))} & Train set & 2.354 & 0.066 & 3.024 & 9.608 \\  & Test set & 2.705 & 0.066 & 3.293 & 9.608 \\ \hline \multirow{2}{*}{Flow behavior index} & Train set & 0.771 & 0.505 & 0.204 & 1 \\  & Test set & 0.751 & 0.505 & 0.205 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Statistical parameters of train and test sets for the ANN model. test set, while the remaining nine subsets were combined to form the training set. This process was repeated ten times, with each subset serving as the test set exactly once. The use of K-fold cross-validation allowed us to mitigate the potential biases associated with the random sampling of the training and test sets, thus enhancing the reliability of our model's performance assessment. The average R\({}^{2}\) value and the standard deviation of the R\({}^{2}\) values from these iterations provided a comprehensive measure of the model's predictive accuracy and consistency. Our results showed that the ANN model performed best when the hidden layer contains 42 nodes. These parameters were carefully chosen to ensure that the model was accurate and reliable in predicting settling velocity in various petroleum engineering applications.