## 2 Materials and Methods
### Machine Learning Approach  
ML techniques are classified as supervised learning, unsupervised learning, semisupervised learning, and reinforcement learning. The far more prevalent type of ML technique is supervised learning, which employs training data to find patterns and predict future outcomes based on previous results. The unsupervised learning framework includes many critical phases, such as data preprocessing, data standardization, feature extraction, algorithm selection, model training, validation, and assessing [56]. The training dataset is employed to create an initial model capable of matching the input data with adjusted variables for model learning. The bulk of model learning procedures are implemented by searching inside the training data for empirical correlations that may result in best-fit relationships that correctly anticipate the model's projected output. The validation dataset is employed to fine-tune the model variable structure in order to obtain greater accuracy in calibration. The probability distribution of the validation set should be the same as that of the training dataset. Furthermore, while the testing dataset is distinct from the training dataset, it shares similar probability distribution. The next step is to train the model by maximizing its performance, which is frequently determined using a cost function. Modifying model hyperparameters that influence the training process, model structure, and characteristics is frequently required. The hyperparameters should typically be adjusted, utilizing validation datasets distinct from both test and training sets.  
Overfitting is a problem that can occur during model training when the model exactly matches all of the points in the dataset while neglecting the regularization criterion. In this case, the trained model almost invariably does not perform effectively during the testing phase. To address this issue, especially with a limited dataset (as in this study instance), the cross-validation (CV) technique is used. The k-fold CV method randomly arranges the sets of training into smaller ones, which are called folds. To calculate and assess prediction accuracy, the model is taught with the folds as training data for every k-fold, and the model is validated with the rest of the data as a test set. This procedure occurs k times inside an iterative loop, and the model evaluation metrics are generated by taking the mean of the metrics obtained during the loop. Although this method is computationally costly, it preserves data, particularly when the algorithm is taught on a limited collection of data.  
Several ML techniques, including multivariable linear regression, Gaussian process regression (GPR), support vector machine (SVM), and support vector regression (SVR),  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Run**} & \multicolumn{4}{c}{**ECAP Parameters**} \\ \cline{2-4}  & **A (N)** & **B (\(\mathbf{\phi}\))** & **C (Route Type)** \\ \hline
2 & 2 & 120 & A \\
3 & 4 & 90 & C \\
4 & 2 & 120 & C \\
5 & 2 & 90 & Bc \\
6 & 2 & 120 & A \\
7 & 2 & 90 & Bc \\
8 & 4 & 120 & Bc \\
9 & 4 & 120 & C \\
10 & 2 & 120 & Bc \\
11 & 1 & 120 & A \\
12 & 4 & 90 & Bc \\
13 & 1 & 90 & A \\
14 & 4 & 90 & A \\
15 & 4 & 90 & A \\
16 & 1 & 90 & A \\ \hline \hline \end{tabular}
\end{table}
Table 1: Experimental design of independent input ECAP process parameters.  
were employed to estimate the ECAP variables of pure Mg. The chosen techniques are shortly described in the part that follows.