# Low-Order Spherical Harmonic HRTF Restoration Using a Neural Network Approach
## 3 Machine Learning HRTF Restoration
### Data Pre-Processing
#### 3.1.1 Data Selection  
We used 6 measurements with an octahedron configuration for the sparse dataset, which is one of the more challenging cases for SH HRTF interpolation, as it involves the second lowest number of measurements in common configurations for 1 st order SH [8]. There were two sets of configurations used, one used in both training and testing, the another one used only in training for data augmentation purpose. The angles are shown in Tables 1 and 2 and Figure 3.  
Amongst all the popular HRTF datasets, only the SADIE I [45], SADIE II [9], IRCAM Listen [46] and Bernschutz KU100 [47] databases can provide the measurements from these angles. Subjects 19 \begin{table}
\begin{tabular}{l c c} \hline \hline  & **Azimuth** & **Elevation** \\ \hline
1 & 90.0 & 0.0 \\ \hline
2 & 270.0 (or \(-90.0\)) & 0.0 \\ \hline
3 & 0.0 & 45.0 \\ \hline
4 & 0.0 & \(-45.0\) \\ \hline
5 & 180.0 & 45.0 \\ \hline
6 & 180.0 & \(-45.0\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Angle selection for training, validation and testing. \begin{table}
\begin{tabular}{l c c} \hline \hline  & **Azimuth** & **Elevation** \\ \hline
1 & 0.0 & 0.0 \\ \hline
2 & 180.0 & 0.0 \\ \hline
3 & 90.0 & 45.0 \\ \hline
4 & 90.0 & \(-45.0\) \\ \hline
5 & 270.0 (or \(-90.0\)) & 45.0 \\ \hline
6 & 270.0 (or \(-90.0\)) & \(-45.0\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Angle selection for training and validation only. and 20 from the SADIE II database were held out for testing and evaluation of the model and were not used in the training. SADIE II Subject 20 was tracked during the training process. This design tries to show how well the model copes with unforeseen HRTF measurements. Furthermore, the Bernschutz HRTFs, measured from a Neumann KU100 dummy head, were also excluded from the training and validation sets but tracked during the training process. This allowed us to study the effect of alternate HRTF measurement methods of expected near-match datasets to the existing KU100 measurements in the training data. By tracking the loss of the test data during training, we could also observe whether there is any over-fitting or under-fitting with different unforeseen measurements (SADIE II test data) or different measurement methods (Bernschutz KU100) separately. Since only the SADIE, IRCAM and Bernschutz datasets had the required measurements for training and validation, it was challenging to produce an accurate model with such a limited variation of HRTF data. Consequently, data augmentation of other HRTF datasets was undertaken to provide some extra data for training and validation. The ARI [42], ITA [43] and RIEC [44] datasets were included with modified angles, i.e., positions with an elevation angle at \(-45^{\circ}\) were changed to \(-30^{\circ}\). This modification was also undertaken for the RIEC dataset, and positions with an elevation angle at \(45^{\circ}\) had that changed to \(50^{\circ}\). The effect of this data augmentation is demonstrated in Section 3.2. A summary of the data selection is shown in Table 3. \begin{table}
\begin{tabular}{c c c} \hline \hline
**HRTF Dataset** & **Training and Validation** & **Testing** \\ \hline SADIE I & ✓ & \\ \hline SADIE II (besides subject 19 and 20) & ✓ & \\ \hline IRCAM Listen & ✓ & \\ \hline ARI & modified 1  & \\ \hline ITA & modified 2  & \\ \hline RIEC & modified 3  & \\ \hline SADIE II (subject 19 and 20) & ✓ & \\ \hline IRCAM Listen & ✓ & \\ \hline ARI & modified 4  & \\ \hline ITA & modified 5  & \\ \hline RIEC & modified 6  & \\ \hline SADIE II (subject 19 and 20) & ✓ & \\ \hline Bernschutz KU100 & ✓ & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: A summary of data selection. Figure 3: Selected HRTF data points (**a**) Angle selection for training, validation and testing. (**b**) Angle selection for training and validation only.