# Deep Learning Regressors of Surface Properties from Atomic Force Microscopy Nanoindentations
## 3 Results and Discussion
### Hertz Regressor  
For each of the six data splits in the cross-validation procedure for the Hertz FCNN, optimal models were selected based on validation error and subsequently evaluated on both synthetic and experimental test sets. Figure 7 illustrates the distribution of percentage error values for the best model in each split. As expected, due to the strong affinity between testing and training data, predictions exhibit notably higher accuracy in synthetic data, with an average percentage error of \(\tilde{\epsilon}=0.67\%\). This outcome aligns with expectations, considering that synthetic data closely mirrors the instances on which the models were trained. Nevertheless, the results obtained on experimental test sets are also noteworthy, indicating the potential for predicting surface properties from nanoindentation curves obtained in real-world scenarios. The mean percentage error across all splits is \(\tilde{\epsilon}=6.14\%\), emphasizing the capability of models trained and validated without the inclusion of real data inputs. This underscores the effectiveness of the proposed approach in predicting surface properties using only synthetic data during the model training and validation phases. It is worth noting that the model exhibiting the lowest accuracy on synthetic data among the six evaluated models (model from Split 1: \(\tilde{\epsilon}_{syn}=1.42\%\) and \(\tilde{\epsilon}_{exp}=7.83\%\)) also demonstrated the poorest performance on real curves. This observation suggests an alignment between the accuracy on synthetic and experimental data. However, this correlation is not \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Hertz FCNN** & **JKR FCNN** \\ \hline
**Optimizer** & Adam & Adam \\
**Activation** & Leaky ReLU & ReLU \\
**Loss** & Huber & MSE \\
**Epochs** & 80 & 110 \\
**Learning Rate** & \(2.3\times 10^{-4}\) & \(3.0\times 10^{-4}\) \\
**Batch Size** & 16 & 16 \\ \hline
**Hidden Layers** & 3 & 3 \\
**1 st HL** & 256 & 128 \\
**2 nd HL** & 256 & 32 \\
**3 rd HL** & 32 & 128 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Hyperparameters and architecture of the optimized FCNNs. Figure 7: Evaluation of the Hertz FCNN on both experimental (blue) and synthetic (orange) test sets. Boxplots depict the error distribution for Hertz FCNNs with the lowest validation error in each split, with the lines that extend above and below each box representing 1.5 times the interquartile range. Horizontal lines translate the average percentage error across the best models for all splits, \(\tilde{\epsilon}_{exp}=6.14\%\) and \(\tilde{\epsilon}_{syn}=0.67\%\). consistently observed across all splits. For the remaining splits, where the MAPE for synthetic curves consistently remained below 1%, no clear relationship emerged. Despite achieving high accuracy on synthetic data, variations in the accuracy of experimental predictions were observed in both positive and negative directions. This means that while a model's accuracy on synthetic data may offer some insights, it does not consistently guarantee a good performance on experimental data across all scenarios, as the complex nature of the experiments may introduce additional factors influencing predictive outcomes, such as AFM artifacts, often related to parameters as the probe shape and laser interference, or even the nonlinear nature of the sample at the indentation depth being studied. To obtain a better insight into the predictions made by our models, Figure 8 provides a detailed description of the results obtained with the best model on experimental data (from Split 3, \(\varepsilon_{exp}=5.17\%\)). For synthetic data, the predicted Young's modulus values closely align with their true labels across the entire domain studied (Figure 8a). This results in 93.5% of the curves in the synthetic test set being predicted with a percentage error below 2.5%, with 66.2% of the instances exhibiting an error lower than 1% (Figure 8c).