## 2 Materials and Methods
### Dissimilarity Reduction Previous to the Transfer Learning  
When carrying out a transfer learning approach, the first and most important assumption that is made is that both domains have some grade of similarity, enhancing the idea of leveraging the knowledge from one to the other. With HVAC equipment, any operatingpoint is defined by a large number of parameters and this similarity cannot be ensured for real systems which are affected by different climate or energy requirements. In addition, the seasonality present in their operation affects the distribution and the same fault can correspond to different operating points. Using samples too distinct would cause a bad effect on the knowledge transfer inferring fault patterns on operating points that are unknown in the reference model, leading to misclassification and therefore decreasing the model's overall accuracy. This fact makes the application of a pure transfer learning methodology not advisable without first filtering the data on the target domain to some extent. This procedure is somehow similar to what is called active learning, which groups different techniques behind the idea of prioritizing the data which needs to be labelled/used to have the highest impact on the training of a supervised model. The most popular techniques of active learning are based on calculating the uncertainty of the predictions. It is argued that the more uncertain the prediction is, the more information it can add to the model if its ground-truth value is added to the training set [47]. Different uncertainty measures have been used in the literature. Among the most used there is the entropy [48; 49; 50], which measures the certainty of a classifier by means of the probabilities or scores that are assigned to each class in the prediction. For a given sample \(x\), the entropy is defined as:  
\[E(x)=\sum_{j=1}^{N}p\big{(}y_{j}|x\big{)}\log p\big{(}y_{j}|x\big{)} \tag{2}\]  
where \(p\big{(}y_{j}|x\big{)}\) represents the probabilities of the classes obtained from the classifier for the sample \(x\) and \(N\) is the number of classes. When the entropy is high, it means that the classifier evaluates nearly equally the classes for that sample. In other words, it is uncertain about which class to assign to the data. Another common method, called margin sampling, is based on computing the difference between the highest and the second highest score in the probabilities' vector. Thus, the confidence is computed by the following equation:  
\[C(x)=p_{1}\big{(}y_{j}|x\big{)}-p_{2}\big{(}y_{j}|x\big{)} \tag{3}\]  
In this case, the idea is to select the samples with the lowest value of confidence. In practice, the data evaluated is sorted from highest to lowest entropy or from lowest to highest confidence and then the use of the samples is prioritized in that manner selecting the samples where the model is more confused about which class should be assigned. This can be counterproductive if applied to a problem with a large domain shift between source and target domains because it will use samples with high uncertainty (i.e., located in the boundaries between previously known classes) to fine-tune the model and will avoid those samples that are actually overlapped with the previously learned distribution, even if they correspond to a different class. In this study, a novel method is proposed based on using the reference model previously constructed as a screener on the labelled target data. Algorithm 1 shows the logical algorithm followed to select the training samples. The objective is to obtain a similarity grade between the available data on the target domain and the data belonging to the source domain, to use only the part of data that reassembles the behaviour of the target. This technique is a trade-off between simplicity and robustness; making it a robust solution to extract the similarity between each of the input vectors.