Not all data is labeled. Unsupervised learning lets you explore data without a target variable: reduce its dimension to visualize and understand it, discover groups, spot atypical observations. For this, scikit-learn offers the same unified API as for supervised learning.
This day follows on from the Python machine learning — level 1 course. It gives your teams a hands-on mastery of the main dimensionality reduction and clustering methods, and focuses on what makes unsupervised learning difficult: without ground truth, how to choose the parameters and judge the quality of a result.
After this course, your staff will be able to
- Understand what unsupervised learning can bring, and its limits
- Prepare data and build unsupervised pipelines with scikit-learn
- Reduce dimensionality and visualize data with PCA
- Group data with the main clustering methods: K-means, hierarchical clustering, DBSCAN, Gaussian mixtures
- Choose the number of groups and the parameters of the methods
- Evaluate a result without ground truth
Detailed program
Module 1 — Principles of unsupervised learning
Unlabeled data: goals and limits. Data scaling and scikit-learn pipelines. Evaluating a result without ground truth.
Module 2 — Dimensionality reduction: PCA
Principal components and explained variance. Choosing the number of components. Why standardizing the data matters. Visualization and interpretation: projection, biplot. PCA as a preprocessing step.
Module 3 — Clustering
Principles and families of methods: partitioning, hierarchical, density-based, probabilistic. Techniques: K-means, hierarchical clustering, DBSCAN, Gaussian mixtures. Choosing the number of groups and the parameters. Evaluation: silhouette coefficient, adjusted Rand index (ARI).
Prerequisite: having taken level 1
This day builds on what the Python machine learning — level 1 course lays down: the scikit-learn API and pipelines, data preparation, cross-validation and rigor in model evaluation. Having taken level 1 is mandatory.
Audience and prerequisites
Target audience
Data scientists, engineers, researchers and Ph.D. students who want to explore and structure unlabeled data with Python.
Prerequisites
Having taken the Python machine learning — level 1 course (mandatory).
Teaching method
The course alternates short theoretical presentations and hands-on exercises in Jupyter notebooks. Each concept is put into practice immediately. I pay particular attention to making sure every participant keeps up, whatever their starting level, and I calibrate the depth of each topic to the group.
The material is given to the participants at the end of the course, along with the notebooks of the examples.
Since 2022, across all my courses, participants have given an average rating of 4.93/5 (289 evaluations over 39 sessions). See the detailed ratings →
Official documentation
scikit-learn: unsupervised learning, including dimensionality reduction and clustering.
Frequently asked questions
Why is level 1 required?
The day builds on the foundations laid in level 1: the scikit-learn API and pipelines, data preparation, rigor in model evaluation. A single day leaves no time to cover them again: they are essential to devote all the time to dimensionality reduction and clustering.
How do you evaluate a clustering without ground truth?
This is the main difficulty of unsupervised learning. The course presents internal criteria such as the silhouette coefficient, the adjusted Rand index when a reference exists, and above all a critical examination of the results: a clustering is judged as much by its interpretation as by a metric.
Does the course cover deep learning?
No. The course covers the classical scikit-learn methods: PCA, K-means, hierarchical clustering, DBSCAN, Gaussian mixtures. Neural-network-based methods (autoencoders, for example) would require other tools (PyTorch, TensorFlow) — it is not the subject of this course.
Is the remote format suitable for this kind of training?
Yes. 90% of participants rate the remote format as equivalent or better than in-person. I have been running remote training since 2020 and have built a solid practice of online teaching. I use Zoom, which makes it possible to record the sessions and share them with participants if desired, and CoCalc, an online platform that gives access to preconfigured servers with all the training material and libraries installed. CoCalc also lets me follow each participant's progress in real time and step in directly to correct or unblock.