# Few-Shot Wideband Tympanometry Classification in
## 2 Material and Method
### Gaussian Processes-Guided Domain Adaptation (GPGDA) Algorithm
As a result, if given the synthetic dataset \(\{(\mathbf{x}^{s},y^{s})\}\) and the realistic dataset \(\{(\mathbf{x}^{r},y^{r})\}\), the conditional distribution \(p(\{y^{r}\}|\{\mathbf{z}^{s}\},\{y^{s}\},\{\mathbf{z}^{r}\})\) could be expressed as \(\mathcal{N}(\hat{\mu}^{r},\hat{\Sigma}^{r})\) with  
\[\hat{\mu}^{r}= K(\{\mathbf{z}^{r}\},\{\mathbf{z}^{s}\})[K(\{\mathbf{z}^{s}\},\{\mathbf{z}^{s}\} )+\sigma_{\epsilon}^{2}l]^{-1}\{y^{s}\}, \tag{7}\] \[\hat{\Sigma}^{r}= K(\{\mathbf{z}^{r}\},\{\mathbf{z}^{r}\})-K(\{\mathbf{z}^{r}\},\{\mathbf{z}^{s}\} )\cdot[K(\{\mathbf{z}^{s}\},\{\mathbf{z}^{s}\})+\sigma_{\epsilon}^{2}l]^{-1}K(\{\mathbf{z} ^{s}\},\{\mathbf{z}^{r}\}).\]  
Then, the loss about uncertainty \(l^{m}\) and the loss about the difference of mean values and labels \(l^{c}\) could be defined as  
\[l^{m} =\frac{1}{n}\sum_{i=1}^{n}\hat{\Sigma}_{i\mu}^{r}, \tag{8}\] \[l^{c} =\frac{1}{n}\sum_{i=1}^{n}(\hat{\mu}_{i}^{r}-y_{i}^{r})^{2}, \tag{9}\]  
Figure 2: Framework of the GPGDA algorithm. All parameters of the network were pre-trained on the source dataset first. Then, the difference between the distribution of features learned from the source dataset and the training dataset (target dataset) was measured via the Gaussian processes, and the parameters of feature extractors were updated based on this information. In addition, the information of training dataset labels was adopted to update the parameters of the classifier individually. CE Loss: cross entropy loss; GP Loss: the difference measured by GP. overlapping parts. Each fold used one part as the testing set and the others as the training set. The recorded results were the average value of testing performance in all folds. Subsequently, the Monte Carlo test was applied, repeating the cross-validation with 10 different random seeds. The mean and standard deviation of these performance values were noted as the final result. **Baseline methods**. In the follow-up comparative study, two existing transfer strategies were designated as baselines, including Fine-Tuning (FT) method in [5] and deep adaptation networks (DAN) in [22]. The two could be regarded as the basic solutions in the field. FT strategy did not explicitly consider the difference between distributions of the source dataset and the target dataset, whereas DAN measured the difference by the MMD distance and employed it to guide the transfer. After reproducing these benchmark methods on the WBT dataset, the performance and efficiency of GPGDA were verified through comparative experiments. **Statistical testing**. The performance results were analyzed by a two-way ANOVA test, of which the factors were the discussed issue for current experiment (approach types, hyperparameter values, etc.) and the type of source datasets. When a significant difference (\(p<0.05\)) was observed for the discussed issue, a post hoc test was further performed using [PERSON]'s multiple comparison test. **Implementation settings**. These approaches were implemented via PyTorch (version 1.9.0) [31] and GPyTorch (version 1.5.0) [32], and the reproduction of DAN method also involved DALIB tools [33]. A single Tesla P100 GPU was utilized to train the networks from scratch. The weights were initialized following the default values from PyTorch. The batch size was 12, the epochs' number was 40, and early stopping was used during the training. The ADAM optimizer [34] was employed to update the CNN parameters with an initial learning rate of 0.001 and a learning rate decay of 0.95 after every 20 epochs, where these hyperparameters followed the default values from PyTorch. Moreover, _SynDataN_, and _SynDataM_[5] were employed as the source datasets in deep transfer learning, and the ratio of augmented/realistic data was 50 (the size of source datasets would be \(50\times n\), where \(n\) was the number of the employed training data).