## 4 Experimental Setup
### Training and Testing  
Both the case (_seen_ in the following) in which the examined dwelling is part of the training dataset (training and testing time periods are in any case strictly separated) and the case of a network trained on houses other than the one on which the test is conducted (_unseen_ in the following) have been evaluated. The first problem allows to evaluate the disaggregation capabilities when the signatures of the appliances in use have been measured, and the model should simply distinguish these signatures in a signal with a strong noise component due to the use of other appliances. The second case, on the other hand, allows us to assess the model's ability to generalise, i.e., to recognise the generic characteristics of a type of household appliance and therefore to be able to disaggregate the consumption of equipment on which no training has been conducted. The results of this case are of greater applicative interest, as they allow to estimate the performance of the algorithm in a scenario where the types of devices present in a house are known and for which only the measurement of the aggregate consumption is available. For each house the dataset is divided into three consecutive time intervals, dedicated to training, validation and testing, which cover respectively 80%, 10% and 10% of the measurements. The split of the houses datasets for the two use cases is shown in Table 3.  
For the _seen_ case, the training is run on the first portion of the data collected for houses 1, 2 and 5, the verification is conducted on the testing portion of the data of house 1. During training, network parameters are saved whenever the target function, calculated on the data validation portion, reaches a new minimum. In the case of _unseen_ the training is conducted on the training portion of houses 1 and 5, the network is tested on the entire time series of house 2 and the weights of the network are saved whenever the target function, calculated on the validation portion of the data of houses 1 and 5, reaches a minimum. In summary, data from dwellings 1 and 5 are used for training and the performance check \begin{table}
\begin{tabular}{l c c c} \hline \hline  & **Fridge** & **Dishwasher** & **Washing Machine** \\ \hline Max. power (W) & 300 & 2500 & 2500 \\ Power threshold (W) & 50 & 10 & 20 \\ OFF duration (min) & 0 & 3 & 30 \\ ON duration (min) & 1 & 30 & 30 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters used to derive the activation status of household appliances from measurements of the absorbed power. \begin{table}
\begin{tabular}{l c c c c c} \hline \hline  & **Use Case: _seen_** & \multicolumn{4}{c}{**Use Case: _unseen_**} \\ \hline  & **Training (\%)** & **Validation (\%)** & **Testing (\%)** & **Training (\%)** & **Validation (\%)** & **Testing (\%)** \\ \hline House 1 & 80 & 10 & 10 & 80 & 10 & - \\ House 2 & 80 & - & - & - & - & 100 \\ House 5 & 80 & - & - & 80 & 10 & - \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Training, Validation and Testing dataset composition for the _seen_ and _unseen_ use cases. is conducted on the entire dataset of the house 2, while data from house 2 are used for performance testing only. The network parameters are optimized with a gradient descent procedure using the Adam [55] (short for Adaptive Moment Estimation) optimization algorithm, with learning rate of \(10^{-4}\), and batch size of 32. For the _seen_ case the training lasts for 300 epochs, while the training stops at 100 epochs for the _unseen_ case to avoid overfitting. Of course, other values have been tested both for the hyperparameters of the optimization algorithm and for the characteristics of the neural network. The values presented gave good results for the convergence times and for the accuracy obtained but do not claim to represent the combination able to guarantee the maximum accuracy for the case under examination since the aim of the work is mainly to verify the validity of the proposed approach.