Application of Teaching Example Based on Clustering Algorithm

Xiang Li, Xin Su, Miao Di, Muzi ZhugeProceedings of the 2018 International Conference on Management, Economics, Education and Social Sciences (MEESS 2018) 2018 · DOI

Abstract

In this paper, K-means and Fuzzy C-means clustering algorithms are used as typical algorithms for data mining courses. In addition, it uses electricity monthly electricity load data for a certain region in domestic as the testing data. With the MATLAB environment, the clustering clusters and different clustering centers for different power consumption behaviors of power consumes are obtained. By analyzing the clustering clusters and clustering centers, the clusters obtained by different algorithms can be roughly divided into three categories, and the power consumers' electricity habits in this area can also be divided into three categories. This paper uses the approach to improve students' interest in learning, expand students' practical applications in clustering algorithms, and cultivate students' creative creativity.

Introduction

Data mining is a cornerstone of modern computer science and statistics, yet teaching it effectively in a classroom setting remains a challenge. Students often struggle to connect mathematical abstractions—like distance metrics and objective functions—to real-world utility. This paper addresses this pedagogical gap by developing a teaching example centered on "Power Consumer Behavior Analysis," moving beyond textbook datasets to show how clustering can solve actual engineering problems, specifically identifying patterns in how different populations use electricity.

Methodology

The study compares two foundational clustering approaches implemented in MATLAB:

  1. K-means Clustering: A partition-based algorithm that divides data into $K$ clusters. Given the high-dimensional nature of power consumption data, the authors utilize cosine similarity rather than standard Euclidean distance to calculate the proximity between data points and cluster centers.
  2. Fuzzy C-means (FCM) Clustering: An evolution of the C-means algorithm that incorporates fuzzy logic. Unlike K-means, where a data point belongs to exactly one cluster, FCM assigns a "membership degree" to each point for every cluster. This is particularly useful for data with overlapping boundaries.

A critical Data Preprocessing step is employed where raw SCADA (Supervisory Control and Data Acquisition) data is normalized to a range of [0, 1]. This step is essential for reducing errors caused by the inherent variability and noise in consumer behaviors.

Dataset and Analysis

The study utilizes real-world electricity monthly load data from a SCADA system of a smart grid in China during October. The data includes typical real-world issues like missed or incorrect sampling, providing students with a realistic scenario for data cleaning and preprocessing.

Despite their different mathematical foundations, both K-means and FCM converged on the same conclusion: regional power consumers can be categorized into three distinct usage habits.

Comparison of clustering results between K-means and Fuzzy C-means algorithms, showing three distinct consumer profiles.

Key Results and Pedagogical Insights

The algorithms successfully identified three categories of load curves, representing different types of consumers (e.g., industrial vs. residential).

  • Stability and Convergence: A key learning point for students is the stability trade-off. K-means is computationally efficient but suffers from instability due to random initialization. In contrast, FCM is presented as a more stable alternative, reducing the impact of initial conditions through fuzzy affiliation probabilities.
  • Performance: The algorithms were set to terminate when the total error between adjacent iterations fell below $1 \times 10^{-5}$. FCM showed a smoother, more predictable convergence path compared to the more erratic behavior of K-means during early iterations.

Conclusion

The authors acknowledge the inherent instability of K-means and suggest that future work should involve guiding students toward optimization algorithms and newer clustering techniques. This case-study approach successfully cultivates practical application skills and "creative creativity" by bridging the gap between abstract theory and industrial reality.

Summary updated

Abstract

In this paper, K-means and Fuzzy C-means clustering algorithms are used as typical algorithms for data mining courses. In addition, it uses electricity monthly electricity load data for a certain region in domestic as the testing data. With the MATLAB environment, the clustering clusters and different clustering centers for different power consumption behaviors of power consumes are obtained. By analyzing the clustering clusters and clustering centers, the clusters obtained by different algorithms can be roughly divided into three categories, and the power consumers' electricity habits in this area can also be divided into three categories. This paper uses the approach to improve students' interest in learning, expand students' practical applications in clustering algorithms, and cultivate students' creative creativity.
BibTeX
@inproceedings{li2018application,
  author = {Xiang Li and Xin Su and Miao Di and Muzi Zhuge},
  title = {{Application of Teaching Example Based on Clustering Algorithm}},
  booktitle = {Proceedings of the 2018 International Conference on Management, Economics, Education and Social Sciences (MEESS 2018)},
  year = {2018},
  doi = {10.2991/meess-18.2018.29},
}
Figure