# Individualized Interaural Feature Learning and Personalized Binaural Localization Model +
## 5 Model Training and Interpretation  
### Model Training and Parameter Selection  
A dataset of synthetic received signals is used for training purposes, and is generated by convolving the source signal and Head-Related Impulse Response (HRIR) in the time domain. The Gaussian noise with about 0.5 s duration is adopted as the source signal and convolved with '003' subject HRIR from the CIPIC database [24], in which the HRIR were recorded at 25 sagittal azimuths and 50 elevations on each sagittal plane. The interaural features are extracted as described in Section 2.3, and we use 16 ms length Hamming window for Short-Time Fourier Transform (STFT) with 8 ms shift, so there are 256 samples with a 16 kHz sampling rate. The selection of window length is based on the assumption of application scenario as a speech source in an indoor environment, so 16 ms is corresponding to 5 m direct path, and the speech signal can be considered as stationary in such short-term. The interaural feature extracted from each frame is treated as a training sample, and 10 samples for each position are randomly selected from the dataset. Moreover, three training conditions with different SNR additive white noise are applied on the training dataset, with the aim of investigating the influence of training data quality.  
In the proposed model, three parameters need to be settled during the training: the candidate feature number at each node, the splitting iteration number \(M\) and the tree number \(\Gamma\). The initial value of \(K^{\prime}\) can be set as the square root of the total feature numbers in **v**, according to [30], and the other two parameters for the azimuth and elevation model are determined by multiple out-of-bag (OOB) data tests on different parameters combinations. Fortunately, the sampling scheme of RF provides a convenient measurement to evaluate the model using OOB error. Recall that around two-thirds of training data were selected as training data after the bootstrap sampling for each tree, so that those un-selected data could be used as testing data. The estimation error of the OOB data is defined as OOB error. Figure 3 shows the OOB errors versus \(\Gamma\) of the azimuth model and elevation model with different selection of \(M\), where the splitting iteration number of the azimuth and elevation model are defined as \(M_{\theta}\) and \(M_{\phi}\), and the tree numbers are defined as \(\Gamma_{\theta}\) and \(\Gamma_{\phi}\), respectively. Intuitively, \(M\) should relate to the class label number and correspond to the accuracy of the model. It can be observed from Figure 3 that small OOB error differences are obtained after a certain number of iterations--that is, \(M_{\theta}=32\) and \(M_{\phi}=64\)--which means the forests are fully developed for the classifications. As for the tree numbers, the OOB error tends to converge at \(\Gamma_{\theta}=30\) for the azimuth model and \(\Gamma_{\phi}=80\) for the elevation model.  
However, since a larger tree number can increase the robustness of the model, 20 extra trees are added on both models, and the final tree numbers are settled as \(\Gamma_{\theta}=50\) and \(\Gamma_{\phi}=100\).