Cluster Analysis in Python
Learn to prepare data, run hierarchical and k-means clustering in SciPy, choose the number of clusters and apply them to images and text.
Cluster analysis finds groups in data that carry no labels, the way a news site gathers related stories under one topic. The lessons cover preparing values so that distances between records mean something, choosing a grouping method, and deciding how many groups the data holds. You work in SciPy and compare hierarchical clustering with k-means on football player statistics, then apply the same ideas to images and text.
What You Will Achieve
- Scale and normalize raw values so distance-based clustering returns sensible groups
- Read a dendrogram to judge how many clusters a dataset contains
- Apply the elbow method to settle on a cluster count before running k-means
- Extract the dominant colors of an image and group documents by their TF-IDF terms
Program Overview
Unsupervised Learning and Data Preparation
Introduces unsupervised learning, the basics of cluster analysis and the normalization work data needs before any grouping.
- Unsupervised learning and its real-world uses
- Pokémon sightings as a first clustering example
- Normalizing list data and small numbers
- Preparing the FIFA 18 player data
Hierarchical and K-Means Methods in SciPy
Runs both algorithms in SciPy, shows how to pick the number of clusters for each, and examines where each one falls short.
- Ward, single and complete methods
- Dendrograms and cluster plots with matplotlib and seaborn
- Elbow method and the effect of random seeds
- Runtime, limitations and the FIFA 18 defenders exercises
Clustering Images, Documents and Many Features
Turns the methods on practical problems and closes with data that has too many variables to plot at once.
- Dominant colors from image RGB values
- TF-IDF clustering of movie plots and their top terms
- Basic checks on clusters with multiple features
- Profiling a complete FIFA 18 player
Certificate Awarded (Paid)
Job Outlook
These skills apply wherever records have to be grouped without labels, such as sorting articles by topic, reducing an image to its main colors or profiling players by their performance statistics.
Good for: Python learners who want to see how two clustering algorithms behave on the same data and when each one stops working well.
Keep in mind: It stays with hierarchical and k-means clustering in SciPy, and its document clustering exercise works on movie plots rather than news articles.
Bottom line: A side-by-side study of two clustering algorithms, run again and again on FIFA 18 player data so their differences become clear.
Frequently Asked Questions
Which Python library handles the clustering?
SciPy carries both the hierarchical and the k-means work throughout the course, while matplotlib and seaborn are used to plot the clusters each algorithm produces.
Which datasets are clustered in the exercises?
FIFA 18 player statistics return in every chapter, with defenders studied twice. Other exercises use Pokémon sightings, comic con data, the RGB values of an image and a set of movie plots.
Does the course explain the weaknesses of each algorithm?
Yes. The hierarchical chapter times a run and discusses its limitations, and the k-means chapter opens by showing how it overcomes that method's biggest drawback, then looks at how seeds and uniform data affect its results.
How does the course deal with data that has many variables?
The last chapter discusses clustering with multiple features, where plotting all the data at once becomes difficult. It covers basic checks you can run on the clusters and ends with a FIFA 18 exercise on what makes a complete player.
User Reviews
Write your review
You must be logged in to post a review.
Reviews can only be posted by registered learners. Log in or create a free account, then you will return here to post.


There are no reviews yet.