Fundamentals of Clustering: Methods, Metrics, and Optimization
摘要
Clustering analysis is a fundamental tool in unsupervised learning, used by researchers from various disciplines to discover intrinsic patterns in unlabeled data sets. This chapter systematically addresses the theoretical and methodological aspects essential for the effective application of these techniques. First, the critical stages of preprocessing are detailed, including missing data imputation techniques (univariate/multivariate implemented with scikit-learn in Python) and normalization and scaling strategies (MinMaxScaler, StandardScaler, RobustScaler, PowerTransformer, QuantileTransformer), emphasizing their role in data preparation. The theoretical and practical pillars of clustering, such as distance and similarity measures, including classical metrics (Euclidean, Minkowski, Mahalanobis) and advanced metrics (cosine, Pearson correlation, DTW), are also comprehensively addressed, highlighting their impact on cluster formation and evaluation. For the selection of the optimal number of clusters, validation methods such as the elbow method, silhouette coefficient, GAP statistic, Calinski-Harabasz index and Davies-Bouldin index are explained, providing a comparative framework to evaluate the quality of the clusters. Representative algorithms from different paradigms are discussed: center-based (k-means, k-medoids), hierarchical (agglomerative, BIRCH), density-based (DBSCAN, OPTICS, HDBSCAN), fuzzy (c-means), graph-based (Spectral Clustering) and probabilistic (Gaussian mixtures) methods, as well as innovative techniques such as Affinity Propagation. Finally, the chapter concludes with a reflection on the challenges and future perspectives in the field of clustering, addressing issues such as the scalability of algorithms for large data volumes, integration with deep learning techniques and improved interpretability of results. This comprehensive view not only provides the necessary theoretical foundations but also guides the reader in the appropriate selection and application of these techniques in real problems, highlighting the importance of a rigorous methodological approach to clustering analysis.