Introduction to Machine Learning with Python

Notebooks and code for the book "Introduction to Machine Learning with Python".

github.com/amueller/introduction_to_ml_with_py…
Introduction to Machine Learning with Python homepage screenshot

About Introduction to Machine Learning with Python

This repository holds the notebooks and supporting code for the book "Introduction to Machine Learning with Python" by Andreas Mueller and Sarah Guido. The notebooks are organized by chapter and cover topics such as supervised and unsupervised learning, representing data and feature engineering, model evaluation and improvement, algorithm chains and pipelines, and working with text data. It also includes mglearn, a library of helper functions for creating figures and datasets.

The code targets the stable version of scikit-learn at the time of writing, 0.20.0, though most of the book can be used with earlier versions if imports from model_selection are adjusted. Setup instructions cover conda and pip, with additional packages needed for graphviz-based visualizations and for the text-processing chapter. All datasets are included except aclImdb, which must be downloaded separately. The repository states that it does not hold the "master notebooks," and directs book errata to the O'Reilly website.

Key features

  • Chapter notebooks covering supervised and unsupervised learning, feature engineering, and pipelines
  • mglearn helper library for creating figures and datasets
  • All datasets bundled except aclImdb, downloaded separately
  • Setup commands for both conda and pip environments
  • Text chapter requires nltk, spaCy and the English language model
  • Notes on scikit-learn 0.20.0 and adjustments for earlier versions
Best for: Readers of the book and Python users practicing scikit-learn who want the accompanying notebooks, helper library and datasets.
Good for
  • Ships the datasets used in the book, apart from aclImdb, which is linked separately
  • Provides conda and pip installation commands plus platform notes for graphviz
  • Documents first-print errata and a renamed plotting function
Watch out for
  • Repository does not hold the master notebooks, so book errata are directed to the O'Reilly website
  • Graphviz installation on Windows is described as tricky, with conda or Anaconda recommended
  • Running the code requires a Python environment with numpy, scipy, scikit-learn, matplotlib, pandas and pillow

Introduction to Machine Learning with Python at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Not stated
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

Introduction to Machine Learning with Python alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in AI Learning & Guides

Well-known listings from the same topic.

All 49

Introduction to Machine Learning with Python FAQ

Which version of scikit-learn does the code require?
The book requires the current stable version, 0.20.0. Most of the book also works with earlier versions, but you need to adjust imports from the model_selection module, mainly cross_val_score, train_test_split and GridSearchCV.
How do I fix "ImportError: No module named mglearn"?
Install mglearn into your Python environment with pip install mglearn in your terminal, or !pip install mglearn in a Jupyter Notebook.
Where should errata be submitted?
Errata for the book should be submitted via the O'Reilly website. Fixes to the code can also be sent as pull requests to the repository.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing