## 3 Results
### Case Study
#### 3.1.2 Load Demand Regional Seasonality  
The K-means clustering method is frequently used to group data based on similarities. This facilitates the analysis of daily load profiles and their interrelationships, providing valuable insights into the underlying demand patterns. In this study, we explore how K-means clustering enhanced the performance of the LSTM neural network for day-ahead load forecasting.  
As illustrated in Figure 9, the K-means clustering algorithm effectively segregates daily load profiles into four distinct clusters, each representing similar load demand conditions throughout the day. This segmentation is visually evident, as the load profiles within each cluster exhibit consistent patterns and levels of energy demand, indicating that the clustering process had successfully grouped days with comparable demand characteristics. The graph demonstrates the distribution of energy demand across various hours of the day, with each color band denoting a different cluster identified by the K-means algorithm. The clustering captures the inherent variability in daily energy demand, with distinct clusters corresponding to different demand levels and shapes. For instance, one cluster may represent typical weekdays with moderate demand, while another could represent high-demand or low-demand days, such as weekends or special events.  
Figure 8: Hourly energy load profiles in the eastern region of Mexico from 2016 to 2022.  
Figure 10 provides a detailed view of the identified clusters. The first group exhibits a steady load demand throughout the day, with a slight increase during peak hours, as illustrated in Figure 10a. This suggests that these days coincide with the warmer months when cooling devices are consistently in use. The second group displays a similar pattern to the previous one but with more pronounced peaks, as shown in Figure 10b. This indicates that these days align with the hottest days of the year, characterized by high energy consumption peaks due to intense cooling needs. The next cluster shows a relatively stable load demand throughout the day, typical of the cooler autumn months when neither heating nor cooling is heavily utilized, as illustrated in Figure 10c. Finally, the last cluster depicts the lowest energy demand associated with winter months during which the need for energy decreases due to mild temperatures, leading to reduced use of heating and cooling devices, as displayed in Figure 10d.  
Table 3 shows the seasonal average temperature in the eastern region of Mexico, indicating that the region's average temperature varies between 20 and 26 \({}^{\circ}\)C. This range affects residential energy consumption due to heating and cooling requirements.  
Figure 10: Load demand clusters. (**a**) Cluster corresponding to the warmer days; (**b**) Cluster corresponding to the hottest days; (**c**) Cluster corresponding to the temperate days; (**d**) Cluster corresponding to the coldest days.  
Figure 9: Grouping of hourly energy profiles from 2016 to 2022 obtained with K-means clustering.  
The clear stratification of load profiles into these clusters indicates that the K-means algorithm had identified significant patterns in the data. Each cluster's homogeneity suggests that the algorithm had grouped days that not only share similar demand magnitudes but also show comparable daily trends and fluctuations. This is crucial for improving the accuracy and robustness of any predictive modeling efforts, such as training an LSTM neural network. By focusing on these clusters, the model can be trained more effectively, capturing the nuanced behavior of load profiles specific to each cluster rather than taking a generalized approach that might miss these important differences. Therefore, the K-means algorithm's ability to segregate daily load profiles into intuitively logical clusters highlights its value in energy demand analysis.