# Deep Machine Learning for Path Length Characterization Using Acoustic Diffraction
## 5 Conclusions  
The performance of the CNN models and the LSTM model validate that both architectures are suitable for the approximation of acoustic path length based on changes in phase and amplitude data. Comparing the mean-square error of the models, the CNN for amplitude data is superior to the CNN phase and LSTM models. The next best model appears to be the LSTM model, which has the advantage of analyzing both phase and amplitude data. Additionally, examining the R-square measure for each model further solidifies this ranking of the models as the CNN for amplitude data achieved a near-perfect R-square statistic followed closely by the LSTM model and then by the CNN phase model. Examining both the performance of the models and the physics behind the models, it is clear that there is room for improvement on the CNN phase model. This model performs poorly on the data collected at 5 MHz only. The data collected at this range encompass data at opposite ends of the Fresnel-Fraunhofer spectrum with some data being highly Fresnel and other data being highly Fraunhofer. As the expectations of phase and amplitude are different for the Fresnel range versus the Fraunhofer range, it may be difficult for the model to generalize data that falls into both ranges but corresponds to the same acoustic path length [18]. To overcome this, we propose future work on this model to extend it into an ensemble model where one model is trained in the Fresnel range and the other is trained in the Fraunhofer range. This should allow the model to pass input data to both models and accept the better outcome without forcing an operator to assess whether the data were Fresnel or Fraunhofer. Another area for future improvements may be in running the LSTM on the raw waveforms. The present LSTM interprets only the transfer function phase and amplitude for the driving frequency. While this should be enough to make decisions about the data, it may not be enough to paint a clear picture of the system. We may experience a loss of information when the data are cut down to a single frequency range, so keeping and analyzing the full spectrum may provide better approximations of acoustic path length. For the LSTM, it is also worth considering if the phase and amplitude data should be analyzed separately as the CNN models found that phase was better predicted with a regression to the ReLU function while amplitude was better predicted by fitting to the hyperbolic tangent function. Further variations of the LSTM model should be created and evaluated to determine if increasing the data leveraged and splitting the data sources leads to better accuracy. Figure 19: Comparison of performances of CNN Phase models for the original 1 MHz, 5 MHz datasets separately and the CNN phase model for 1 MHz and 5 MHz combined with 2.17 mm hole data only. In the left figure, we see the predictions of the model when run on solely the path length 12.95, the path length 25.13, and the path length 123, meaning only the 1 MHz data, which have the least range of diffraction patterns, as most of the data were Fraunhofer or Fraunhofer-like. In the middle figure, we see the predictions of the model when run solely on the path length 64.74, the path length 125.66, and then the path length 614.99, meaning only the 5 MHz data which have the most range of diffraction patterns, as much of the data were Fresnel or Fresnel-like. Finally, in the figure on the right we see the model performance when run on the 2.17 mm anomaly data from both the 1 and 5 MHz data, which clearly exhibits the least amount of error, as nearly all of the data generated with the 2.17 mm anomaly are within the Fraunhofer range, as seen in Table 3.  
**Author Contributions:** Conceptualization, S.Y. ; methodology, B.E.J. and S.Y. ; software, B.E.J. ; validation, B.E.J. and S.Y. ; formal analysis, B.E.J. and S.Y. ; investigation, B.E.J. and S.Y. ; data curation, B.E.J. ; writing--original draft preparation, B.E.J. ; writing--review and editing, B.E.J. and S.Y.