## 2 Materials and Methods
### Transfer Learning to the Target Model  
Following the same procedure described for the case of the reference model construction, in the target model the data needs to be balanced. On this occasion, after the dissimilarity reduction process described above, a new resampling stage is applied, but now aiming at balancing the target dataset, which is assumed to contain a large number of samples from the healthy class and a few samples of the faulty ones. In contrast with the scheme followed for the reference model, where the fault samples are considered enough and the majority class was reduced, here the faulty classes are over-sampled using the SMOTE algorithm [4]. In this study, the SMOTE applied makes use of the 5-nearest-neighbours to a sample to create a new similar instance. Then, a parameter transfer learning approach is applied, using the reference model weights and bias as the starting point for the target model and the fine-tuning process is carried out using the filtered target data. The flowchart of the methodology, including all the steps explained in this section, is presented in Figure 2.  
Regarding the features used to derive the model, the methodology developed only uses variables and measurements directly obtained from the building's energy management system. Typically, these signals consist of both metered sensors and data that is sent to the HVAC system actuators. In an ideal scenario, the sensor network installed in the Air-handling units will include temperature, pressure, flow rate and power meters. However, in practice, only temperature sensors are found in the majority of installations since the rest are relatively expensive and not essential for equipment control. A recent study on feature selection for AHU FDD algorithms [35] showed that among the most important variables to add as features there are air temperatures and humidities at the different stages of the AHU system. Thus, the set of features used in this study to characterize the AHUs system corresponds to information available in the vast majority of HVAC monitoring devices. The features used in this study are listed in Table 1.  
\begin{table}
\begin{tabular}{c c c} \hline
**Variable** & **Meaning** & **Description** \\ \hline \(T_{sa}\) & Supply air temperature & Temperature at the exit of the AHU served to thermal zones, after the mixing box, heating and cooling coils and the supply fan. \\ \(T_{oa}\) & Outdoor air temperature & Temperature of the fresh air that is fed into the fresh air intake. The volume of air is controlled by the outside air dampers. \\ \(T_{ma}\) & Mixed air temperature & Temperature of the mixing chamber or economizer, where the fresh air is mixed with the exhaust air allowing the recirculation of the latter. \\ \(T_{ra}\) & Return air temperature & Temperature of the air that leaves the thermal zone, before the return fan. \\ \(T_{sa,\;sp}\) & Supply air temperature setpoint & Setpoint for \(T_{sa}\). It is achieved by modifying the control (e.g., open/close dampers, heating/cooling the air) \\ \hline \end{tabular}
\end{table}
Table 1: Features used for the development of the fault detection and diagnosis model.  
Figure 2: Flowchart of the semi-supervised transfer learning methodology.