Conteúdo do Curso
Cluster Analysis
Cluster Analysis
Implementing GMM on Real Data
To understand how Gaussian mixture models (GMMs) perform on real-world data, we apply them to the well-known Iris dataset, which contains measurements of flower species. The algorithm is as follows:
-
Exploratory data analysis (EDA):before applying GMM, we performed some basic EDA on the Iris dataset to understand its structure;
-
Training the GMM:after EDA, the GMM was implemented to cluster the dataset into groups. Since the Iris dataset has three species, we predefined the number of clusters to 3. During training, the model identified clusters based on the likelihood of each data point belonging to a Gaussian distribution;
-
Results:the model effectively grouped the data into clusters. Some points were assigned to overlapping regions with probabilistic weights, demonstrating GMM's strength in handling real-world data with subtle boundaries;
-
Comparing clusters with true labels:to evaluate the model's performance, the GMM clusters were compared with the actual species labels in the dataset. Although GMM doesn't use labels during training, the clusters closely matched the true species groups, showing its effectiveness for unsupervised learning.
This implementation highlights how GMMs can model complex real-world datasets, making them versatile tools for clustering tasks.
Obrigado pelo seu feedback!