## 2 Materials and Methods
### Neural Network  
TensorFlow [24], a commonly-used python library designed for the development and execution of machine learning algorithms, is used to implement a cascade-correlation NN, the topology of which connects the input feature vector to every layer within the NN. Additionally, all layers' outputs are connected to subsequent layers in the NN, as in Figure 3[25]. The use of NN over GMM was chosen based on findings in [15], which suggested that DNN outperformed GMM for binaural localisation tasks. The decision to use the cascade-correlation NN was based on comparisons between the cascade-correlation NN architecture and the MLP, which showed that the cascade-correlation NN arrived at a more accurate solution with less training required compared to the MLP (Table 2). The NN consists of an input layer, one hidden layer and an output layer. The input layer contains one node for each feature in the training data; the hidden layer contains 128 neurons each with a hyperbolic tangent activation function; and the output layer contains 360 neurons, one for each azimuth direction from 0\({}^{\circ}\) to 359\({}^{\circ}\). Using 360 output neurons as opposed to 104 (one for each angle  
\begin{table} \begin{tabular}{c c c} \hline \hline
**Neural Network** & **Within \(\pm\)5\({}^{\circ}\)** & **Run Time** \\ \hline \multicolumn{3}{c}{**KEMAR Reflections (Test Data)**} \\ \hline multi-layer perceptron & 26.39\% & 390 Epochs 40 s \\ cascade-correlation & 32.64\% & 244 Epochs 28 s \\ \hline \hline \end{tabular} \begin{tabular}{c c} \hline \hline
**Key** \\ \(=\) Weighted Connection \\ Data \\ Flow \\ \hline \hline \end{tabular} 
\begin{tabular}{c c} \hline \hline
**Output** \\ Layer \\ \(1\)  
of the training dataset) allows the NN to make attempts at predicting the DoA for both known and unknown source positions. A softmax activation function is then applied to the output layer of the NN, producing a probability vector predicting the likelihood of the analysed signal having arrived from each of the 360 possible DoAs. Each data point, whether it be a feature in the input feature vector or the output of a previous layer, is connected to a neuron via a weighted connection. The summed response of all the weighted connections linked to a neuron defines that neuron's level of activation when presented with a specific data configuration, a bias is then applied to this activation level. These weights and biases for each layer of the NN are initialised with random values, with the weights distributed such that they will be zero mean and have a standard deviation (\(\sigma\)) defined as:  
\[\sigma_{i}=m^{-1/2} \tag{4}\]  
where \(m\) is the number of inputs to hidden layer \(i\)[26]. The NN is trained over a maximum of 600 epochs, with the training terminating once the NN reached 100% accuracy or improvement saturation. Improvement saturation is defined as no improvement over a training period equal to 5% of the total number of epochs. Mini-batches are used to train the NN with sizes equal to 25% of the training data. The order of the training data is randomised after each epoch, so the NN never receives the same batch of data twice. The adaptive moment estimation (ADAM) optimiser [27] is used for training, using a learning rate of 0.001, a \(\beta_{1}\) value of 0.9, a \(\beta_{2}\) value of 0.99 and an \(\epsilon\) value of \(1^{-7}\). The \(\beta\) values define the exponential decay for the moment estimates, and \(\epsilon\) is the numerical stability constant [27]. The NN's targets are defined as a vector of size 360, with a one in the index relating to the DoA and all other entries equal to zero. The DoA is therefore extracted from the probability vector produced by the NN as the angle with the highest probability such that,  
\[\theta=argmax\ \mathcal{P}(\theta|x) \tag{5}\]  
where \(\mathcal{P}(\theta|x)\) represents the probability of azimuth angle \(\theta\) given the feature vector \(x\).