# Deep Machine Learning for Path Length Characterization Using Acoustic Diffraction
## 3 Results  
In verifying that the data collected are applicable to both CNN and LSTM architectures, it is important to ensure that the distribution of the data corresponds to possible relationships between each sample. For this purpose, we examine the box-and-whisker charts in Figure 13. We see that in the amplitude data the values have the most variation near the central locations; however, the range of outliers remains fairly consistent across all locations. This means that outliers likely correspond to mild changes in the experimental setup due to variations in the positioning of the receiver, rather than anomalies in the data, which would make patterns in the data difficult to learn. The higher variation near the center is likely due to the increased strength of the signal near the center of the plate. On the converse, we see that there is more variation in phase values as the data are taken further from the center. This is because phase is evaluated as the ratio of the sine component to the cosine, which decreases as we move toward the edge of the system. The smaller the values, the greater the error. In the phase data, the range of the outliers mostly decreases as we move toward the center of the system except for a few locations within one centimeter of the center. This is likely due to the rapid change in phase, which may be observed in various locations near the center depending on where the anomaly is located. This will lead to more complexities in learning the trend of the transfer function phase data. Finally, we examine the correlation of the phase and amplitude data across all lateral locations and with the acoustic path length values. In Figure 14, we can see there is a strong correlation between each amplitude value with its neighboring value, however, only mild correlations between neighboring phase values. This is expected because the amplitude is a smoother function of x than the phase. We also see a much stronger correlation of the middle amplitude values with acoustic path length while phase only exhibits strong correlations with acoustic path length at the exterior locations. Despite the lower correlations in the phase locations, it appears there is enough correlation that the spatial relationships between values will be learnable by an LSTM. For all models, performance was assessed by observing the improvement of loss as mean square error over all training epochs, by plotting the actual vs. the predicted acoustic path lengths, and by producing the R-square metric. Examining each of these metrics enables us to examine how the models performed, comparatively. Figure 12: The Model Architecture for LSTM. From the trend in the mean square error (MSE), we can determine that the model has trained to a stable point and has minimized the mean square error efficiently and without over-fitting. In Figure 15, it is evident that the training and validation error begins roughly the same for each model. From here, the LSTM struggles to decrease at first, before rapidly descending around epoch 9 and converging near 0.00067. The phase CNN model's error decreases smoothly as the model trains for 8 epochs, after which the loss begins to stabilize near 0.003. Finally, the amplitude CNN experiences a large drop in loss immediately and spends the rest of the epochs slowly converging near an MSE of 0.00016. Figure 14: Correlation matrices of Amplitude values (**left**) and phase values (**right**). Figure 13: Examining the data range and distribution of amplitude (**top**) and phase (**bottom**) values. By examining the plot of real vs. predicted values and the regression line for the best fit in Figure 16, we can compare how accurately the models predict the acoustic path length. Note that at the same physical thickness, the acoustic path length differs depending on the driving frequency. We also examine the R-squared statistic to determine how well a regression line fits the predictions.