# Context-Based Energy Disaggregation in Smart Homes
## 5 Experimental Results  
In this section, we describe the experimental activities carried out to validate our approach. First, we describe the dataset [10] that we used and how we extracted the HMM models for each considered appliance. We then show and discuss a meaningful disaggregation test for each context-based conditioning mechanism by providing both the graphical and the numerical disaggregation results at appliance level. Averaged disaggregation results are also discussed for four different test cases and compared them with the basic algorithm by [PERSON] and [PERSON] [9]. Appliance profiling has been performed using Python scripts on a machine equipped with an Intel Core 2 Duo P8400 at  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**j** & **S1** & **S2** & **S3** \\ \hline
**i** & 1 & 0 & 0 \\
**S2** & 0.0307 & 0.9690 & 0.0003 \\
**S3** & 0 & 0.0012 & 0.9988 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Example of a transition matrix for a washing machine derived by taking into account user presence information.  
Figure 5: State machine of a washing machine taking into account user presence information for two consecutive time intervals.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**j** & **S1** & **S2** & **S3** \\ \hline
**i** & 1 & 0 & 0 \\
**S1** & 0 & 0 & 0 \\
**S2** & 0 & 0 & 0 \\
**S3** & 0 & 0 & 0 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Transition matrix of a washing machine taking into account user presence information for two consecutive time intervals.  
2.26 GHz, 3 GB RAM; disaggregation test campaigns have been performed using Matlab version R2012a on a machine equipped with an Intel Core2 Duo CPU T7500 at 2.2 GHz, 2 GB RAM and another with Intel Core 4 i7-3610 QM at 2.3 GHz, 8 GB RAM.  
In order to provide experimental results which could be compared with those of other works, the precision and recall parameters [42] have been chosen. The parameters are calculated as follows:  
\[Precision=\frac{True\,positive}{True\,positive+False\,positive} \tag{1}\]  
\[Recall=\frac{True\,positive}{True\,positive+False\,negative} \tag{2}\]  
Considering the real and the disaggregated power samples for each device:  
* The true positive parameter represents the number of samples that have been correctly classified or, more precisely, the power quantity correctly assigned to that device.
* The false positive parameter represents the number of samples that have been incorrectly classified or, more precisely, the power quantity incorrectly assigned to that device.
* The false negative parameter represents the number of samples that should be but have not been classified or, more precisely, the power quantity that should have been assigned to that device but has been assigned to another or has not been assigned at all.  
The _precision_ parameter measures the portion of power samples that has been correctly classified among the power samples assigned to a given device. The _recall_ parameter measures what power portion of a given device is correctly classified in general, also considering that samples that would belong to that device but have been wrongly assigned to another or not assigned at all.  
In order to show a general parameter that could combine the results obtained through the _precision_ and _recall_ analysis, the _F-Measure_ parameter has been considered and calculated as follows.  
\[F-Measure=2\,\frac{Precision\,Recall}{Precision+Recall} \tag{3}\]  
Although _F-Measure_ represents a statistical combination of _precision_ and _recall_, in our experimentation, the first parameter has a more pertinent meaning in the single appliance disaggregation results, as it enhances the percentage of the right assigned power samples. For this reason, in our test-cases discussed below, _precision_ results are shown at a single appliance level, while at a test and overall level, recall and F-Measure are also pointed out.