## 4 Nonlinear Regression of the Type-A Grounding System Effective Length  
The first approach to developing a predictive interpolant model of the effective length of each electrode based on the available dataset [24] will be the selection of a suitable mathematical model function with which we will try to approximate the effect of the independent variables (features) on the electrode effective length. In order to test our approximation function properly, we first divided the 880 simulation results into a randomly chosen training set comprised of 90% of the simulation results, whereas the remaining 10% of the results represent the test set. The main idea, as usual, is to use the training set to perform the regression procedure and then use the test set to validate the quality of the produced approximation function and its estimated coefficients. After a number of numerical and mathematical experiments, a simple product of power functions was selected as a model function for the prediction of the effective length of each electrode for the type-A grounding system:  
\[\ell_{eff}(\rho,T_{1},d)\sim\beta_{1}\cdot\rho^{\beta_{2}}\cdot d^{\beta_{3}} \cdot T_{1}^{\beta_{4}} \tag{2}\]  
where \(\beta\)s are the unknown regression function coefficients. We fitted the selected model function to the input data from the training set using a nonlinear least-squares regression algorithm [30] and thus obtained optimized values of the unknown coefficients. These estimated coefficients, along with their standard errors, are given in Table 2.  
In order to confirm the validity of the derived regression function, we conducted a comprehensive analysis of our regression model's performance using several regression quality metrics. This included creating scatter plots of actual vs. predicted values, as well as a residuals plot for both the training and test sets. Additionally, we evaluated three standard regression metrics [31; 32]: the Root Mean Squared Error (RMSE), the \(R^{2}\) value, and the Mean Absolute Error (MAE), for both datasets. Figure 5a,b depict the actual vs. predicted values of the effective length of the type-A grounding system obtained using Equation (2) for the training set and the test set, respectively. Similarly, Figure 6a,b depict the residuals of predicted values obtained using Equation (2) for the training set and the test set, respectively. Observing Figure 5a for this simplest approximation function, when applying the regression formula given by Equation (2) with the optimized coefficient value given in Table 2 on the training set, the produced results deviate from the perfect score moderately. They, nevertheless, yield relatively accurate results, although the data show clear signs of heteroscedasticity [33], i.e., the heterogeneity of variance. The moderately accurate results provided by the regression function are further validated on the test set (Figure 5b), where the regression function defined by Equation (2) performs similarly. A different visualization of this model error is presented in Figure 6a,b, where the residuals of the regression function are depicted relative to the predicted values. It is evident that, for this case, the residuals vary \(\pm 10\) m from the predicted responses, especially for greater \begin{table}
\begin{tabular}{c c c} \hline \hline
**Coefficient** & **Coefficient Value** & **Standard Error** \\ \hline \(\beta_{1}\) & 1.06047194 & 0.00654518 \\ \(\beta_{2}\) & 0.5448882 & 0.00079717 \\ \(\beta_{3}\) & \(-0.04140804\) & 0.00077016 \\ \(\beta_{4}\) & 0.22164814 & 0.00087788 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Estimated values of coefficients for the regression function given by Equation (2). values of the grounding system's effective length. Note that the regression function displays a certain amount of heteroscedasticity for both plot types, which indicates that the variance progressively increases as the predicted values increase.