# Data Analytics for Profiling Low-Voltage Customers with Smart Meter Readings
## 3 Proposed Approach
### Two-Stage Classification Process
#### 3.3.2 Clustering for Grouping Customers (Stage 2)  
The customer characterization for each considered typical day group of daily load patterns is passed through normalization and PCA.  
The normalization of the profiles is made by using the daily energy consumption. By considering the samples \(s(t)\), for \(t=1\dots\) 96, of each daily profile \(S\), the samples of the normalized time series \(s_{n}(t)\) are calculated as in Equation (1).  
\[s_{n}(t)=\frac{s(t)}{\sum_{h=1}^{96}s(h)} \tag{1}\]  
where \(\sum_{h=1}^{96}s(h)\) is the daily energy consumption. With this transformation, the sum of the samples of the normalized profiles is always unitary. This normalization makes customers' profiles comparable even if they show different consumption levels, as shown in Figure 4.  
In terms of the large number of profiles to be treated, before the clustering step, for reducing the dimension of the space of the features and, as a consequence, decreasing the computational effort of this stage of clustering, the PCA to the consumption pattern of 96 samples for each of the 12 typical days of the year is applied. The final selected features are the first \(p\) principal components that assure the decomposition covers a high percentage (e.g., >80%) of the variance of the original ones [30].  
Once passed through the normalization and the PCA, the data are ready for the second stage of classification.  
This stage is devoted to homogeneous grouping customers into classes by looking for the similarity of their consumption profiles' shape Figure 5 shows the flow diagram of the proposed clustering approach that includes an inner optimization for defining the optimal number of clusters. Two clustering techniques, \(k\)-means and [PERSON]'s hierarchical method, both with Euclidean distance as similarity metric, are compared for finding the most effective result. To objectively assess the reliability of the obtained partition, authors have proposed several clustering validity indices in the literature [10; 28]. Among the most acknowledged validity indices (e.g., Davies-Bouldin [36], the Calinski-Harabasz [37], and the Silhouette index [38]), DBI is used in this paper for comparing the performance of the two clustering techniques. This index measures the level of separation among clusters. Moreover, since both the two clustering methods work with a priori defined minimum and maximum number of clusters (i.e., \(K_{min}\), \(K_{max}\)), the clustering analysis is iteratively performed with both the two methods, by considering all the number of clusters in the  
Figure 4: Real vs. normalized daily profiles of two residential customers.  
a priori defined range. For each number of clusters in the range, the relevant DBI is calculated, with the final subdivision being the one that maximizes the performance (i.e., the DBI minimum value of among all the examined cases).  
Furthermore, since the used clustering methods tend to maintain the clusters populated in a relatively uniform way, with a low attitude to isolate the outliers [28], an external iterative procedure is triggered to eliminate possible outliers. Suppose a cluster includes \(N_{K}\) customer profiles, with \(N_{K}\) lower than the defined threshold (\(N_{I}\)), the corresponding customers are excluded, and a new clustering analysis is performed on the reduced dataset. The process results are the centroids of the clusters relevant to each homogeneous group of customers. Each centroid represents the LP of the customers that belong to the cluster. It will also represent other customers with characteristics similar to the ones belonging to the corresponding cluster.