3.3.2. Clustering to Indicate Different Working Conditions of the EPN

For the defined input database, the clustering with the Ward algorithm was carried out using the Statistica 13 program (StatSoft Polska, Kraków Polska). Figure 4 presents the CA dendrogram. The time results of clustering are presented in Figures 5–9, which show a defined final number of clusters equal to 2, 3, 4, 5, and 6. This selection of the number of clusters was realized using the dendrogram (Figure 4). The authors decided to indicate the cluster that has a connection distance greater than 100. Thus, no clusters equal or less than 6 were investigated. In the figures, the "virtual" cluster 0 was defined, which represents the data that was flagged in the initial stage. Using knowledge about the object, different working conditions, which may affect the data classification, were defined:

	- working of DG: from 27.04, hour 00:00, to 08.05, hour 06:00; day 13.05, hours 11.00–12.00; day 22.05, hours 13.20–16.50
	- from 12.05.2017, hour 16.10 to 14.05.2017, hour 22:20
	- each Monday–Saturday, hours 6.00–10.00: maintenance break during the first shift
	- each Saturday, hour 22.00 to Monday, hour 6.00: the weekend character of working

**Figure 4.** Dendrogram of the CA using the Ward algorithm.

**Figure 5.** Cluster analysis results for the final number of clusters equal to 2.

**Figure 6.** Cluster analysis results for the final number of clusters equal to 3.

**Figure 8.** Cluster analysis results for the final number of clusters equal to 5.

**Figure 9.** Cluster analysis results for the final number of clusters equal to 6.

Table 1 shows a summary of the analyzed working conditions and the assignment of clusters. The three conditions previously mentioned (DG working, reconfiguration, maintenance breaks) were indicated, and one unknown condition was observed. This unknown condition was indicated for the final number of clusters equal to at least 4. The reconfiguration of the EPN connection was indicated for the final number of clusters equal to 5. The impact of the DG and maintenance breaks was observed for all the presented classifications.


**Table 1.** The connection between the number of clusters and the working conditions of the electrical power network.

A further investigation is carried out for the final number of clusters equal to 6, although it may be realized for the other numbers too.

The analysis of the cluster assignment to the working conditions indicated that:


There is an obvious question concerning which of the input parameters was important with regards to the obtained final classification. Thus, the predictor importance analysis using the Statistica 13 software (in accordance with the guidelines of a StatSoft Polska [78] and Breiman et. al. [84]) was realized for the classification of the 6 clusters. The results are presented in Figure 10. The results show that the highest impact (importance rate > 0.7) is for:


**Figure 10.** Importance rate of the factors to the output of the cluster analysis results for the final number of clusters equal to 6.
