rasbt/python-machine-learning-book: 13 Chapter Notebooks For One Edition Only
The "Python Machine Learning (1st edition)" book code repository and info resource
At a glance
- What is it?
- The companion repository for Sebastian Raschka's Python Machine Learning is thirteen chapter notebooks for one edition of one book, with no descriptive text of its own and no pinned environment. It works beside the printed chapters, not instead of them.
- Who is it for?
- Use this repository if you own the 1st edition and want its thirteen chapter notebooks next to the text, and use the separate 2nd edition repository for anything newer. Before adopting a notebook, check the library versions its cells expect, because no requirements or environment file records them, and confirm the setup steps in code/ch01/README.md, because the top-level README carries no install command of its own.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 120 days ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- rasbt/python-machine-learning-book12,673 ★ · +29
| Repository | 2026-09-11 | 2026-11-15 |
|---|---|---|
| rasbt/python-machine-learning-book | 12.6k | 12.7k |
29 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
A note dated 09/21/2017 sends 2nd edition readers to a different repository
An important note dated 09/21/2017 states that this repository contains the code examples of the 1st Edition and directs anyone looking for the 2nd Edition to the separate python-machine-learning-book-2nd-edition repository. That split is the first thing to settle, because the two code bases are not interchangeable and only one of them lives here. The book data below is fixed to that edition as well: published September 23rd 2015, paperback 454 pages, publisher Packt Publishing, ISBN-10 1783555130, ISBN-13 978-1783555130, Kindle ASIN B00YSILNL0. The same block lists ISBN-13 numbers for German, Japanese, Italian, Chinese traditional, Chinese mainland, Korean, and Russian translations, which is a reminder that the printed text exists in several languages while the code does not follow it. The file is also loose about length, calling the book 400 pages in its prose and 454 pages in the paperback listing. The top-level tree is .gitignore, LICENSE.txt, README.md, code/, docs/, faq/, and images/, under an MIT license.
The notebooks are code excerpts that lose their reasoning outside the book
The README carries its own warning that these are just the code examples accompanying the book, uploaded for convenience, and that the notebooks may not be useful without the formulae and descriptive text. That warning decides how far this repository can carry you. Thirteen chapter directories run from ch01 to ch13, each holding a matching chNN.ipynb file, and the chapter titles span training classifiers, building good training sets, compressing data through dimensionality reduction, model evaluation and hyperparameter optimization, ensembling, sentiment analysis, embedding a model in a web application, regression, clustering analysis, and neural networks for image recognition. Stripped of the pages that explain them, those cells are a record of what the author ran, not an explanation of why. The repository cannot stand in for the book on preprocessing choices, evaluation splits, or the reasoning behind the neural network layers, and the omissions go further back than the chapters: math and NumPy primers were left out of the book for length reasons and now exist as PDF and EPUB files on the author's own domain. Budget for the book, or read code without knowing which decision each block implements.
Chapter links only resolve through the NbViewer host
Every chapter line in the table of contents carries three targets rather than one: a directory link, an ipynb link, and an nbviewer link, and the file explains why by stating that the internal document links are only supported by the NbViewer version. A single chapter therefore looks like this in the source:
./code/ch05
./code/ch05/ch05.ipynb
https://nbviewer.ipython.org/github/rasbt/python-machine-learning-book/blob/master/code/ch05/ch05.ipynbThe consequence is a navigation dependency on someone else's rendering service. Open the raw .ipynb through GitHub's own file view and the table of contents links inside the notebook do not work, so finding chapter 5 from chapter 4 means jumping back to the README and picking a different link. The service is a third party host rather than anything shipped in the tree, and the repository contains no notebook server, no kernel declaration, and no launcher. Readers who work offline or in an environment without outbound access to nbviewer.ipython.org are left with cloned files and manual navigation, which is the mode the repository supports least well.
The working libraries are NumPy, scikit-learn, and Theano, with no second backend
The README names the stack directly, saying the concepts are put into action mainly using NumPy, scikit-learn, and Theano, and it states the aim is to explain the underlying concepts rather than present another how scikit-learn works book. The chapter list shows where that choice lands. Chapter 3 is a tour of machine learning classifiers using scikit-learn, chapter 5 compresses data through dimensionality reduction, chapter 6 covers model evaluation and hyperparameter optimization, chapter 7 combines models for ensemble learning, and the final two chapters are training artificial neural networks for image recognition and parallelizing neural network training via Theano. Those three names are the only backends the file refers to. What the repository cannot offer is a route off that stack: a reader whose own work runs on a different library gets the data preparation, classifier comparison, and evaluation material, but the parallel training chapter has no counterpart in a framework they already use. Check what your project runs on before treating chapter 13 as a template.
The newest release tag is from 2016 while master was pushed in 2026
The repository is not archived, and the last push is dated 2026-07-18, so the default branch master is still receiving commits. The release history tells a slower story: the newest tag is v1.3 from 2016-09-30, preceded by v1.2 on 2016-03-27 and v1.0, marked 1st Edition, on 2015-10-06. Read together, that means nothing has been packaged or tagged in roughly a decade while the branch itself keeps moving, and no commit is described as belonging to a later edition. The practical consequences follow from that gap. There is no versioned artifact to pin, so a notebook that worked for a reader in 2016 has no named release to fall back on, and there is no changelog separating book corrections from later edits to the tree. The 09/21/2017 edition notice remains the newest dated statement about which code this is, and the only external recognition in the file is an unlabelled image link to a Computing Reviews page with bestYear=2016 in its query string.
Setup instructions sit in one chapter README and nothing pins a version
There is no install command in the top-level file. Setup is delegated to a single document linked from the table of contents as Instructions for setting up Python and the Jupiter Notebook, pointing at ./code/ch01/README.md, with the misspelling of Jupyter carried in the link text itself. Among the top-level entries of .gitignore, LICENSE.txt, README.md, code/, docs/, faq/, and images/ there is no requirements file, no environment file, and no packaging metadata. The consequence is concrete and immediate: after cloning, no requirements or environment file tells you which versions of NumPy, scikit-learn, or Theano the cells were written against, and code written for the 2015 and 2016 releases can fail on a current install. If you need a working environment, you assemble it yourself from what the chapter 1 setup document says and from the imports inside the notebooks, then keep it somewhere outside the clone.
Background material is scattered across an external site, a Google Group, and another repository
What the repository does contain is mostly pointers, and the material most useful when a notebook fails sits outside the clone. The equation reference is a PDF and a TEX file under docs/equations, the Foreword and Preface excerpts are PDFs under docs/, and a FAQ section is linked from the top of the file and backed by a faq/ directory. Reader discussion happens on a Google Groups board named python-machine-learning-reader-discussion-board, not in the tree. The teaching slides come from Dmitriy Dligach's machine learning course at Loyola University Chicago and live in his own PyMLSlides repository. The Algebra Basics, calculus and differentiation, and Introduction to NumPy primers are PDF and EPUB files hosted on the author's domain. That scattering is a cost worth naming before you rely on any of it: the derivations that explain a formula and the version notes that explain a broken cell are both one link away from a server this repository does not control, and none of those copies are pinned to the commit you happen to be reading, so they can change without the notebooks changing.
Editorial conclusion
Use this repository if you own the 1st edition and want its thirteen chapter notebooks next to the text, and use the separate 2nd edition repository for anything newer. Before adopting a notebook, check the library versions its cells expect, because no requirements or environment file records them, and confirm the setup steps in code/ch01/README.md, because the top-level README carries no install command of its own.
Frequently asked questions
What is the best book to learn machine learning using Python?
This repository cannot settle that question, since it holds only the code examples for the 1st edition of Python Machine Learning, published September 23rd 2015 by Packt Publishing as a 454 page paperback, and the file itself says the notebooks may not be useful without the book's formulae and descriptive text.
Is machine learning with Python easy?
The repository spans 13 chapters, from giving computers the ability to learn from data through classification, preprocessing, dimensionality reduction, ensembling, sentiment analysis, web deployment, regression, clustering, and neural networks, with NumPy, scikit-learn, and Theano named as the working libraries. The file makes no claim about how hard any of it is.
Can I learn ML in 3 months?
Nothing in the repository addresses a timeline. It does give you 13 chapter notebooks, a 454 page paperback listing, and the author's own caution that those notebooks are code examples uploaded for convenience rather than a course.
Can Python be self-taught?
Setup for Python and the Jupyter Notebook is linked from the table of contents to ./code/ch01/README.md, a reader discussion board exists on Google Groups under the name python-machine-learning-reader-discussion-board, and the math and NumPy primer chapters left out of the book for length reasons are freely available as PDF and EPUB files.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rasbt-python-machine-learning-book)Star history chart for your README
[](https://hysenlabs.com/projects/rasbt-python-machine-learning-book)Was this useful?