Twelve thousand stars for a 2015 ML textbook’s code
This repo hosts the runnable NumPy, scikit-learn, and Theano companions to a 2015 machine-learning textbook that prioritizes mathematical theory over API tutorials.

What it does This is the official companion repository for the first edition of Sebastian Raschka’s Python Machine Learning (Packt, 2015). It hosts thirteen Jupyter notebooks—one per chapter—that translate the book’s mathematical explanations into runnable code using NumPy, scikit-learn, and Theano. Think of it as the answer key for a rigorous introductory course: useful if you own the textbook, but explicitly not designed to stand alone.
The interesting bit The author warns that the notebooks are incomplete without the surrounding formulae and prose, which is an unusually honest admission for a publisher-backed repo. The collection also includes a separate equation reference PDF, LaTeX sources, and freely downloadable math primers—algebra, calculus, and NumPy—that were originally cut for length, effectively turning the repository into a mini open-access curriculum around the commercial book.
Key highlights
- Thirteen chapter notebooks covering classification, preprocessing, dimensionality reduction, ensemble methods, sentiment analysis, regression, clustering, and neural networks via Theano.
- Supplemental teaching slides contributed by a Loyola University Chicago course instructor.
- Standalone equation reference sheet (
pymle-equations.pdf) with LaTeX source. - Freely hosted math and NumPy primer PDFs and EPUBs salvaged from another Raschka book.
- Explicitly archived: the README redirects readers looking for the 2nd edition code to a separate repository.
Caveats
- The notebooks are not self-contained; the author warns they “may not be useful without the formulae and descriptive text” from the printed book.
- This repository is strictly for the 2015 first edition; readers looking for the updated second edition must switch to a different repo.
Verdict Grab this if you are working through the first edition of Raschka’s book or want a curated, theory-first tour of foundational machine-learning techniques in Python. Skip it if you need a self-contained notebook tutorial or the updated second edition code.
Frequently asked
- What is rasbt/python-machine-learning-book?
- This repo hosts the runnable NumPy, scikit-learn, and Theano companions to a 2015 machine-learning textbook that prioritizes mathematical theory over API tutorials.
- Is python-machine-learning-book open source?
- Yes — rasbt/python-machine-learning-book is open source, released under the MIT license.
- What language is python-machine-learning-book written in?
- rasbt/python-machine-learning-book is primarily written in Jupyter Notebook.
- How popular is python-machine-learning-book?
- rasbt/python-machine-learning-book has 12.6k stars on GitHub.
- Where can I find python-machine-learning-book?
- rasbt/python-machine-learning-book is on GitHub at https://github.com/rasbt/python-machine-learning-book.