Unsupervised Learning in Python
Cluster unlabeled data with k-means and hierarchical methods, reduce dimensions with PCA and NMF, and build a recommender in Python.
Unsupervised learning looks for structure in data that carries no labels, with no prediction task steering the search. You group similar samples into clusters, lay high-dimensional measurements out on a flat two-dimensional picture, and compress a dataset into fewer features that are easier to read. The work is done in Python with scikit-learn on examples such as grain measurements, fish, stock prices and Wikipedia articles, and it closes with a recommender that suggests musical artists.
What You Will Achieve
- Choose a number of k-means clusters from an inertia plot and check the result against known categories with a cross-tabulation
- Read a dendrogram and extract flat cluster labels at a chosen linkage distance
- Decide how many PCA components to keep by inspecting the variance each one explains
- Recommend related articles or musical artists by comparing NMF features with cosine similarity
Program Overview
Clustering Datasets with k-means
Groups samples with k-means and judges how good a clustering is, working on grain, fish and stock price data.
- Clustering 2D points and inspecting the result
- Inertia and choosing how many clusters
- Scaling features for better clusterings
- Stocks that move together
Hierarchical Clustering and t-SNE Maps
Turns clusterings into pictures: tree diagrams of merging clusters and two-dimensional maps where nearby points are similar samples.
- Dendrograms of grain and stock data
- Comparing linkage methods
- Labels from intermediate clusterings
- t-SNE maps of the grain data and the stock market
Dimension Reduction with PCA and NMF
Compresses datasets into fewer features, first with principal components and then with non-negative parts that read as topics or image patterns.
- Decorrelation and principal components
- Intrinsic dimension of the fish data
- Clustering Wikipedia articles from a tf-idf array
- NMF topics, LED digit parts and recommender systems
Certificate Awarded (Paid)
Job Outlook
These methods are used wherever unlabeled data needs sorting, such as segmenting customers, grouping documents by topic, exploring measurements before modeling and building recommendation features in data science and machine learning work.
Good for: Python users who want guided, exercise-by-exercise practice with clustering, PCA and NMF on real example datasets.
Keep in mind: Every exercise works on the course’s own example data, such as grain, fish, stock and Wikipedia sets, and the closing artist recommender is an exercise built on NMF features.
Bottom line: A tightly scoped run through four unsupervised methods that ties each one to a concrete dataset and ends in a small artist recommender.
Frequently Asked Questions
Which datasets do the exercises use?
The lessons work with grain and fish measurements, stock market prices, a set of Wikipedia articles, an LED digits image dataset and musical artist data for the closing recommender exercises.
What is t-SNE used for here?
t-SNE places each sample on a two-dimensional map so that similar samples sit close together. The course applies it to the grain data and to stock prices to see the groups visually.
How does NMF differ from PCA in the lessons?
PCA decorrelates data and keeps the components that carry the most variance. NMF instead expresses each sample as a combination of interpretable parts, such as topics in documents or patterns in images, and one lesson shows that PCA does not learn parts.
Are transcripts and a glossary provided?
Yes. The videos include live transcripts that can be revealed from a link at the bottom left of each video, and a course glossary is available in the resources section.


There are no reviews yet.