# Data Augmentation Method Using Room Transfer Function for Monitoring of Domestic Activities
## 3 Proposed Data Augmentation Method
### Statistical Properties of Ratio of the Two Room Transfer Functions  
Since our aim was to augment the dataset using RTFs without the need for additional data collection, we opted to generate \(|H_{2}(f)/H_{1}(f)|\) as a random value instead of measuring an additional RTF through experiments. To achieve this, it is essential to derive the statistical characteristics of \(|H_{2}(f)/H_{1}(f)|\) through the statistical properties of the RTFs. From (4), it is evident that the magnitude of the transfer function \(H(f)\), denoted as \(|H(f)|\), follows a Rayleigh distribution. Therefore, it can be understood that both \(|H_{1}(f)|\) and \(|H_{2}(f)|\) also follow a Rayleigh distribution. Consequently, \(|H_{2}(f)|/|H_{1}(f)|\) can be considered as the ratio of two different data, with each following a Rayleigh distribution. Hence, it is necessary to obtain the statistical characteristics of the ratio of transfer functions that follow independent Rayleigh distributions. In [24],we can find the mean and variance of the ratio of two Rayleigh distributions. The probability density function (PDF) of a random variable \(|H|\) with Rayleigh distribution is given by  
\[f_{|H|}(h)=\left\{ \begin{array}{ll}\frac{1}{\rho^{2}}h\exp(-\frac{1}{2\rho^{ 2}}h^{2})),&h>0,\rho>0\\ 0&\text{otherwise},\end{array} \right. \tag{9}\]  
where \(\rho\)(\(>\)0) is scale parameter of Rayleigh distribution. The PDF and cumulative distribution function (CDF) of the ratio of \(|H_{1}|\) to \(|H_{2}|\) were provided earlier by [PERSON] et al. [24], where \(|H_{1}|\) and \(|H_{2}|\) are assumed to be independent and identically distributed (i.i.d.) Rayleigh random variables. Considering \(R=|H_{2}|/|H_{1}|\), the PDF and CDF of \(R\) are given by (10) and (11), respectively [24]:  
\[f_{R}(r)=\frac{2\rho_{2}^{2}\rho_{1}^{2}r}{[\rho_{1}^{2}r^{2}+\rho_{2}^{2}]^{2}} \tag{10}\]  
and  
\[F_{R}(r)=1-\frac{\rho_{2}^{2}}{\rho_{1}^{2}r^{2}+\rho_{2}^{2}} \tag{11}\]  
where \(\rho_{1}\) and \(\rho_{2}\) are the scale parameters of Rayleigh distribution of \(|H_{1}|\) and \(|H_{2}|\), respectively, and \(r>0\), \(\rho_{1}>0\) and \(\rho_{2}>0\). Using (11), we can obtain a random value that follows (10). We arranged the generated random values in a matrix matching the feature size to multiply by \(|H_{2}/H_{1}|\) as demonstrated in (12). \[\widehat{Y}_{aug}(k,n)=\alpha(k,n)Y_{orig}(k,n) \tag{12}\]  
where \(k=1,\cdots,F\) and \(n=1,\cdots,T\) are indices of time frame and frequency bin, respectively. \(Y_{orig}(k,n)\) and \(\widehat{Y}_{aug}(k,n)\) are \((k,n)\)-th elements of time-frequency-domain features  
Figure 5: Sound transmission in room. of \(\mathbf{Y}_{orig}\in\mathbb{R}_{+}^{F\times T}\) (for original signal) and \(\mathbf{\tilde{Y}}_{aug}\in\mathbb{R}_{+}^{F\times T}\) (for augmented signal), respectively. \(\alpha(k,n)\) is a coefficient for data augmentation which follows the ratio of Rayleigh distribution (10) and (11) for \(k\)-th frequency bin and \(n\)-th time frame. The set of coefficients \(\alpha(k,n)\) to make augmented time-frequency-domain features \(\mathbf{\tilde{Y}}_{aug}\) for an audio signal is denoted by \(\mathbf{A}\in\mathbb{R}_{+}^{F\times T}\) in the matrix form. Figure 6 illustrates the application of the computed RIR to the mel features. After feature extraction, the data to be augmented were multiplied with a matrix generated using the random values in (12) in an element-wise manner. The overall data augmentation algorithm is presented as a pseudocode below in Algorithm 1.