# Semantically Controlled Adaptive Equalisation in Reduced Dimensionality Parameter Space +
## 4 Model
### Parameter Scaling  
As the configuration of the filter parameters assigned to each descriptor by the user during equalisation is likely to vary based on the audio signal being processed, the first requirement of the model is to apply weights to the parameters based on knowledge of the audio data at the time of processing. To do this, we selectively extract features from the signal LTAS before and after the filter is applied. This is possible due to the configuration of the data collection architecture, highlighted in Figure 1b. The weights (\(\alpha_{m}\)) can then be expressed as a function of the LTAS, where the function's definition varies based on the parameter representation (_i.e._, gain, centre frequency, or bandwidth of the corresponding filter). We use the LTAS to prevent the parameters from adapting each time a new frame is read. In practice, we are able to do this by presenting users with means to store the audio data, rather than continually extracting it from the audio stream. Each weighting is defined as the ratio between a spectral feature taken from the filtered audio signal (\(A_{k}^{\prime}\)) and the signal filtered by an enclosing rectangular window (\(R_{k}\)). Here, the rectangular window is bounded by the minimum and maximum frequency values attainable by the observed filter \(f_{k}(A)\). We can define the equaliser as an array of biquad functions arranged in series, as depicted in Equation (5). \[ \begin{array}{c}f_{k}=f_{k-1}(A,P_{k-1})\\ k=1,\ldots,K-1\end{array}  \tag{5}\]  
Here, \(K=5\) represents the number of filters used by the equaliser and \(f_{k}\) represents the \(k^{th}\) biquad function, which we can define by its transfer function, given in Equation (6). \[H_{k}(z)=c\cdot\frac{1+b_{1}z^{-1}+b_{2}z^{-2}}{1+a_{1}z^{-1}+a_{2}z^{-2}} \tag{6}\]  
The LTAS is then modified by the filter as in Equation (7) and the weighted parameter vector can be derived using the function expressed in Equation (8). \[A_{k}^{\prime}=|H_{k}(e^{\mu\omega})|A_{k} \tag{7}\]  
\[p_{n}^{\prime}=\alpha_{m}(k)\cdot p_{n} \tag{8}\]  
where \(p_{n}\) is the \(n^{th}\) parameter in the vector \(P\). The weighting function is then defined by the parameter type (\(m\)), where \(m=0\) represents gain, \(m=1\) represents centre-frequency, and \(m=2\) represents bandwidth. For gain parameters, the weights are expressed as a ratio of the spectral energy in the filtered spectrum (\(A^{\prime}\)) to the spectral energy in the enclosing rectangular window (\(R_{k}\)), derived in Equation (9) and illustrated in Figure 3.  
\[\alpha_{0}(k)=\frac{\sum_{i}(A_{k}^{\prime})_{i}}{\sum_{i}(R_{k})_{i}} \tag{9}\]  
For frequency parameters (\(m=1\)), the weights are expressed as a ratio of the respective spectral centroids of \(A^{\prime}\) and \(R_{k}\), as demonstrated in Equation (10), where \(bn_{i}\) are the corresponding frequency bins. \[\alpha_{1}(k)=\left(\frac{\sum_{i}(A_{k}^{\prime})_{i}bn_{i}}{\sum_{i}(A_{k}^ {\prime})_{i}}\right)/\left(\frac{\sum_{i}(R_{k})_{i}bn_{i}}{\sum_{i}(R_{k})_{ i}}\right) \tag{10}\]  
Figure 2: An overview of the proposed model. The grey horizontal paths represent training and implementation (user input) phases. Finally, the weights for bandwidth parameters (\(m=2\)) are defined as the ratio of spectral spread exhibited by both \(A^{\prime}\) and \(R_{k}\). This is demonstrated in Equation (11), where \((x)_{sc}\) represents the spectral centroid of \(x\). \[\alpha_{2}(k)=\left(\frac{\sum_{i}\left(bn_{i}-(A^{\prime}_{k})_{ sc}\right)^{2}(A^{\prime}_{k})_{i}}{\sum_{i}(A^{\prime}_{k})_{i}}\right)/ \left(\frac{\sum_{i}\left(bn_{i}-(R_{k})_{sc}\right)^{2}(R_{k})_{i}}{\sum_{i}(R_ {k})_{i}}\right) \tag{11}\]  
During the implementation phase, retrieval of the unweighted parameters, given a weighted vector, can be achieved by simply multiplying the weighted parameters with the inverse weights vector, as in Equation (12). \[\hat{p}_{n}=\alpha_{m}^{-1}(k)\cdot p_{n}^{\prime} \tag{12}\]  
where \(\hat{p}\) is a reconstructed version of \(p\), after dimensionality reduction has been applied.