O'Reilly unsupervised learning book, now with TensorFlow 2.x
Companion notebooks for a practical guide to finding patterns in unlabeled data using scikit-learn and TensorFlow.

What it does This repository holds the code for Ankur Patel’s O’Reilly book on unsupervised learning. It covers clustering, anomaly detection, autoencoders, GANs, and dimensionality reduction through runnable Jupyter notebooks. The setup targets local conda environments with separate Windows, macOS, and Apple Silicon paths, plus a Google Colab option.
The interesting bit The repo was updated in May 2021 to support TensorFlow 2.x and add Fashion MNIST examples — a maintenance burden that many book repos skip entirely. The data lives on Google Drive because the files are too large for GitHub, which is a pragmatic admission of infrastructure limits.
Key highlights
- Covers scikit-learn and TensorFlow for production-ready unsupervised learning
- Includes anomaly detection (credit card fraud), user segmentation, and synthetic image generation
- Supports Google Colab for zero-local-setup experimentation
- Separate conda environments for Windows, Intel Mac, and Apple Silicon with NVIDIA CUDA 11.0 support
- Author provides direct email contact for setup issues
Caveats
- Requires manual data download from Google Drive; not self-contained
- TensorFlow for macOS setup involves alpha-release wheel files from Apple’s repo, which may drift out of date
- Some environment files reference Python 3.8, which is now several releases behind
Verdict Worth bookmarking if you’re working through the book or need reference implementations of classic unsupervised techniques. Skip if you want a standalone, batteries-included tutorial repo — this is a companion, not a self-guided course.