# Context-Based Energy Disaggregation in Smart Homes
## 5 Experimental Results
### Appliance Profiling
Each Gaussian component is represented by the following shape:  
\[g(x|\mu_{i},\sum_{i})=\frac{1}{(2\pi)^{\frac{D}{2}}|\sum_{i}|^{\frac{1}{2}}} \exp\{-\frac{1}{2}(x-\mu_{i})^{\prime}\sum_{i}^{-1}(x-\mu_{i})\}, \tag{5}\]  
where \(\mu_{i}\) is the mean vector and \(\sum_{i}\) is the covariance matrix. The mixture weights meet the following condition:  
\[\sum_{i=1}^{M}\omega_{i}=1. \tag{6}\]  
There are several variants of the GMM that have just been introduced, depending on the calculation type of the parameters that describe the distribution. The choice of model configuration (number of components, dense or diagonal covariance matrices, link among parameters, _etc._) is often determined by the amount of available data to estimate the parameters of GMM and the environment in which the GMM is applied. One of the most important attributes of GMM is its ability to form smooth approximations of arbitrary distribution densities. A GMM acts as a sort of hybrid that uses a discrete set of Gaussian functions, each with its own parameters (mean and covariance matrices), in order to permit a better modeling capability. In this paper the data model that have been associated to each device is composed from the following components:  
* The data \(x=\{x_{1},\ldots,x_{L}\}\) represent the sample data which is in turn a realization of \(X=\{X_{1},\ldots,X_{L}\}\)
* \(X_{i}\) represents the \(i^{th}\) data flow which is described by a \(d\)-dimensional feature space \(\{F_{1},\ldots,F_{D}\}\). * \(X\) can be divided in data that have been labeled as \(X_{1}\) but not \(X_{u}\). * \(K=\{k_{1},\ldots,k_{N}\}\) represents the set of state classes that are associated to each device. Therefore, our clustering problem is reduced to finding the \(N\)-states which better represent each monitored device [47]. We chose to adopt GMM because of its excellent characteristics of adaptability to the proposed data. This approach allows in fact to more clearly extract the device representative states characterized by an average value and its respective variance. Table 5 shows comparative results regarding state extraction obtained with the two algorithms for a refrigerator and a washing machine. In the refrigerator case, \(k\)-means returns two mean values that are too similar (about 66 and 61) and thus results are not useful for the HMM model extraction aim. Instead, GMM reported more defined low consumption mean values together with acceptable variance values. In the washing machine case, GMM emerges for its smaller variance as the obtained mean values for each algorithm are similar. As introduced in Section 4, the Hidden Markov Model includes the definition of a transition matrix. Therefore, we extracted the statistical model associated with each device, or, more precisely, the state transition function that models the appliance power consumption behavior with its associated probability. For each type of appliance, according to the set of states generated through the GMM, we mapped the sequence of samples in the power traces into a sequence of states. We then detected all the transition events (including the self transitions) and counted their occurrence to extract the corresponding probability. Figures 1 and 3 show the state machine and transition probability matrix that we obtained for a washing machine, respectively.