*5.2. Comparison of Physics-Based Hybrid Model and Purely Data-Driven ANN*

With a comparison of the physics-based corrective prediction in Figure 12a to a purely data-driven ANN prediction model in Figure 12b, an example for the benefits of a corrective physics-based ANN model over a purely data-driven ANN is provided. As can be seen in the comparison of the predictions in the expanded parameter space, predictions that are purely based on data exhibit pronounced errors, which is not the case for the ANN where physical laws are considered in the contained analytical model solution. This good prediction performance is a consequence of remaining within the trained range of correction factors as well as a result of the enhanced prediction ability of the hybrid model itself, which is owed to the decreased complexity of the correction problem. Even though the R<sup>2</sup> values for the data-driven ANN are both above 99% on training and validation sets as well as above 95% on the testing set, the MSEs on the expanded space are almost two orders of magnitude higher than the one of the physics-based corrective model and amounts to over 1700 MPa<sup>2</sup> , see Table 6. The MSE of the corrective model measures just below 31 MPa<sup>2</sup> . The determination coefficient *R* <sup>2</sup> of the corrective approach on the extrapolation data set is highly alike to the *R* <sup>2</sup> values on the other data sets and is still as high as 99.39%, whereas for the data-driven approach, the *R* <sup>2</sup> values are all above 99% on training and validation and above 95% on test data sets but drops down to 65% for predictions on the expanded parameter space.

The absolute value of the relative error of both physics-based corrective model as well as purely data-driven model is defined as *err*, according to [48], and computed via:

$$err := \left| \frac{d - y^N}{d} \right| \tag{9}$$

with true values *d*, predicted values *y* and number of samples *N*. The maximum *err* from the data-driven model is approximately 53% and just below 8% for the corrective model at *n*/*N* = 1, as shown in Figure 12c, where the normalized number of samples is sorted from small to large *err* values. As a result, consideration of the problem's physics through the semi-analytical model leads to a better generalization compared to using a purely datadriven predictor relying on the relevant physics to be represented (only) in the training data. In particular, via the corrective ANN, interpolation within its trained value range of correction factors can still be performed, even on the expanded parameter space; whereas via the data-driven ANN, extrapolating predictions are performed within the expanded parameter space, which is unfeasible for an ANN because its predictive function is fitted to the training data and becomes unreliable in a variable space for which no training data is available. So, in this use-case example, based on a physically reasonable extension of the parameter space, a physics-based correction model exhibits superior prediction performance over a data-driven model, under the condition that results can be adjusted with the trained range of correction factors to achieve the anticipated solution.


**Table 6.** Prediction metrics of the hybrid model and purely data-driven ANN: *R* <sup>2</sup> and MSE for residual stresses of samples in training, validation, test and expanded parameter space data sets.

**Figure 12.** Juxtaposition of predicted values and true/desired values on training, validation, test sets and expanded parameter space data set, achieved by (**a**) the physics-based hybrid model and (**b**) the purely data-driven ANN, respectively. (**c**) shows the relative error of samples n normalized with the total number of samples N, sorted from low to high *err* values on the data set with expanded parameter space generated by hybrid model and data-driven ANN.

#### *5.3. Data Reduction Effects on Hybrid Model and Data-Driven ANN Predictions*

In this section, the prediction performances of the hybrid model and the data-driven ANN are juxtaposed while the total number of samples is reduced. The total data set is split into training, validation and test data sets via a constant data-split ratio of 80/10/10, throughout a reduction of the total data set from 100% to 20% by increments of 10%. Thus, a 100% data set consists of 66 training, 8 validation and 8 test samples (as in all previous sections); whereas a 20% data set contains 13 training, 1 validation and 1 test sample(s). The specific samples and total sample number in the expanded-space data set remained constant at 35. For each data-reduction step, the data split is performed randomly and three times, each time with a different random state, in order to avoid prediction results that depend on specific samples contained in the respective data sets. Consequently, the MSE average and standard deviation of the corresponding three prediction models are calculated and used for further evaluation.

The hybrid model outperforms the data-driven ANN on the test data set with respect to an overall decreased mean MSE and continuously lower standard deviations. On average, the mean MSE is lower and its standard deviation decreased, when performing predictions with the hybrid model compared to the data-driven ANN. As shown in Figure 13a, these outperformances appear clearly once the amount of samples in the total data set in reduced below 60%, i.e., below a sample number of 49, as well as at the smallest total data set of 20%, respectively. On the extrapolation data set, the superior prediction ability of the hybrid model over the data-driven ANN is magnified with respect to a significantly lower average mean MSE and a substantially decreased standard deviation, see Figure 13b.

These outperformances could be due to several reasons. Primarily, the corrective ANN with its correction factor prediction is assumed to be more simple in complexity and in non-linearity than the residual stress prediction of the data-driven ANN. Consequently, the

corrective ANN in combination with the semi-analytical model is more stable and robust in its predictions once the amount of data is reduced, in comparison to the data-driven ANN. In addition, there appears to be a higher dependence on specific samples being contained in the training and validation data sets for the data-driven ANN since the variation of mean MSE and standard deviation are more significant within an identical amount of data (but different random data splits). Ultimately, the proposed corrective approach, i.e., hybrid model consisting of the semi-analytical model and the corrective ANN, exhibits a number of benefits over a purely data-driven ANN, even more when the amount of data is scare or very limited, such as in DoE data sets.

**Figure 13.** Comparison of prediction performances of hybrid model and direct ANN with respect to the average mean squared error (MSE) and standard deviation achieved on (**a**) the test data set and (**b**) the extrapolation data set, while reducing the amount of the total data set (training, validation and test data sets) from 100% to 20% in increments of 10%-steps, respectively. All MSE average values and standard deviations are based on three different MSEs and their respective standard deviations that are achieved on dissimilar data splits implemented by changing pseudo-random-states.
