mlbookcamp-code ships the notebooks behind the Machine Learning Bookcamp book
The code from the Machine Learning Bookcamp book
At a glance
- What is it?
- The mlbookcamp-code repository holds the code for the Machine Learning Bookcamp book, from linear regression on car prices through churn prediction, evaluation metrics, tree ensembles, convolutional networks, and deployment with Flask, Docker, Lambda, Kubernetes and Kubeflow, plus four introductory appendices on Python, NumPy and Pandas. It is Jupyter notebooks, the licence is unrecorded, and the repository is organised one directory per chapter.
- Who is it for?
- mlbookcamp-code suits a reader working through the Machine Learning Bookcamp who wants the book's code laid out chapter by chapter rather than scattered, since each chapter has its own directory and the notebooks follow the same sequence as the text, from exploratory analysis to deployment.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 32 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 October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What the repository is and what it is not
The repository is the code from the Machine Learning Bookcamp book, and the README describes it in one line. Everything else in the file is a chapter listing.
That is worth saying plainly at the start, because it sets expectations. This is not a library, not a framework and not a tool. It is a set of Jupyter notebooks and supporting files that accompany a specific book, organised so that each chapter's code sits in its own directory and the reader can work through them in order.
The repository root makes the structure visible. There are directories for chapter-02-car-price, chapter-03-churn-prediction, chapter-05-deployment, chapter-06-trees, chapter-07-neural-nets, chapter-08-serverless, chapter-09-kubernetes and chapter-09-kubeflow, plus course-zoomcamp, images, util, and three top-level notebooks for the appendices: appendix-b-python.ipynb, appendix-c-numpy.ipynb and appendix-d-pandas.ipynb. There is also a useful_code.py file at the root, which is the kind of helper that accumulates the small repeated pieces of a teaching project.
The primary language is recorded as Jupyter Notebook, which is an honest description. The code inside is Python, but the artefact is the notebook, with its prose, its outputs and its execution order.
The licence is recorded as unknown, and there is no LICENSE file at the top level, which is a genuine practical limitation for anyone who wants to reuse the notebooks in their own work rather than read them. The repository links the supplementary pages at mlbookcamp.com and points at datatalks.club as the place to ask questions about the book and report problems, with a dedicated channel for it.
The last push was on 2026-09-21, and the only release listed is chapter7-model, a tag for the models for Chapter 7 on deep learning, dated 2025-08-11.
The first three chapters and how the notebooks are shaped
The chapter list reads as a curriculum, and the sequence is deliberate.
Chapter 1 is Introduction to Machine Learning, covering what machine learning is and the problems it can solve, CRISP-DM for organising a successful project, training and selecting models, and model validation. The README says No code for that chapter, which is correct: it is the chapter that teaches the methodology the rest of the book applies.
Chapter 2 is Machine Learning for Regression, and it is the first one with a notebook: chapter-02-car-price/02-carprice.ipynb. The topics are creating a car-price prediction project with a linear regression model, doing an initial exploratory data analysis with Jupyter notebooks, setting up a validation framework, implementing the linear regression model from scratch, doing simple feature engineering, keeping the model under control with regularization, and using the model to predict car prices.
The phrase from scratch is the signal. The book implements the model rather than calling a library function, which is the pedagogical point of the chapter and the reason the notebook is long.
Chapter 3 is Machine Learning for Classification, with churn prediction as the running example: chapter-03-churn-prediction/03-churn.ipynb. It covers predicting customers who will churn with logistic regression, exploratory data analysis to identify important features, encoding categorical variables so they can be used in the models, and using logistic regression for classification.
Chapter 4 is Evaluation Metrics for Classification, and it reuses the churn project rather than introducing a new one: chapter-03-churn-prediction/04-metrics.ipynb. The topics are accuracy and its limitations, using a confusion table to determine where the model makes mistakes, deriving precision and recall from that table, using ROC and AUC to understand performance further, cross-validating a model, and tuning parameters for the best predictive performance.
The file location is worth noticing. The metrics notebook lives inside the chapter-03-churn-prediction directory even though it is Chapter 4, because it continues the same project. That is a small signal about how the repository is organised: by project rather than strictly by chapter number, which is the right choice for a course that deliberately builds one dataset up across lessons.
Deployment, ensembles and neural networks
From Chapter 5 the repository shifts from notebooks to directories, and that is a fair signal of what each chapter involves.
Chapter 5 is Deploying Machine Learning Models, and the code link points at the chapter-05-deployment directory rather than a single notebook. The topics are saving models with Pickle, serving models with Flask, managing dependencies with Pipenv, making the service self-contained with Docker, and deploying it to the cloud using AWS Elastic Beanstalk. That progression is the argument the book makes about what production means for a model, and it is a chain of five separate technologies rather than one exercise.
Chapter 6 is Decision Trees and Ensemble Learning: chapter-06-trees/06-trees.ipynb. It predicts the risk of default with tree-based models, covers the decision tree learning algorithm, and then covers random forest as putting multiple trees together into one model and gradient boosting as an alternative way of combining decision trees.
Chapter 7 is Neural Networks and Deep Learning, with chapter-07-neural-nets/07-neural-nets-train.ipynb. The topics are convolutional neural networks for image classification, TensorFlow and Keras as frameworks for building them, using pre-trained networks, the internals of a convolutional neural network, training a model with transfer learning, and data augmentation as the process of generating more training data.
The Chapter 7 tag on the releases list points at the trained models for this chapter, which tells you the notebooks produce artefacts you are expected to load rather than retrain.
The naming convention for the notebooks is consistent, which is a sign of a maintained course rather than a collection of one-off files: the chapter number and a short topic name, with the training notebook distinguished by a -train suffix.
Serverless, Kubernetes and Kubeflow
The last two chapters cover the parts of machine learning that people find hardest to get right, and they are separate directories because they are separate systems.
Chapter 8 is Serverless Deep Learning, with the code at chapter-08-serverless. It covers serving models with TensorFlow-Lite as a light-weight environment for applying TensorFlow models, deploying deep learning models with AWS Lambda, and exposing the Lambda function as a web service via API Gateway.
The TensorFlow-Lite step is doing specific work here. Lambda has a memory ceiling and a startup time budget, and a full TensorFlow runtime does not fit comfortably in either, so the chapter's move is to convert the model into the light-weight form and serve that.
Chapter 9 is Kubernetes and Kubeflow, and the README splits it into two halves. Under Kubernetes, the topics are understanding different methods of deploying and serving models in the cloud, serving Keras and TensorFlow models with TensorFlow-Serving, and deploying TensorFlow-Serving to Kubernetes, with the code at chapter-09-kubernetes.
Under Kubeflow, the topic is using Kubeflow and KFServing for simplifying the deployment process, with the code at chapter-09-kubeflow.
The README also links three articles from mlbookcamp.com that accompany this chapter: Creating an EKS Cluster, Creating a KFServing Cluster on EKS, and KFServing Transformers. Those links are the practical part, because a Kubernetes and KFServing setup is mostly cluster provisioning, and that is the kind of thing a notebook does not cover well.
The two directories point at two quite different levels of abstraction. The Kubernetes half is about the individual components, TensorFlow-Serving on a cluster, and the Kubeflow half is about a higher layer that packages the same job into a more managed form.
The appendices and the free course
The appendices carry the teaching content most readers need most, and they are the four notebooks at the root of the repository.
Appendix A is Setting up the Environment, and it has No code. The topics are installing Anaconda, a Python distribution that includes most of the scientific libraries needed, running a Jupyter Notebook service from a remote machine, installing and configuring the Kaggle command line interface tool for accessing datasets from Kaggle, and creating an EC2 machine on AWS using both the web interface and the command line interface. Two articles from mlbookcamp.com accompany it, Creating an AWS account and Renting an EC2 instance.
That appendix is where the actual prerequisites live, and it matters for anyone trying to reproduce the notebooks, because the datasets are fetched through the Kaggle command line tool and the deeper chapters need cloud resources.
Appendix B is Introduction to Python, with appendix-b-python.ipynb. It covers basic syntax with variables and control flow, the collections of lists, tuples, sets and dictionaries, list comprehensions, reusability through functions, classes and importing code, package management with pip, and running Python scripts.
Appendix C is Introduction to NumPy and Linear Algebra, with appendix-c-numpy.ipynb: one and two dimensional arrays, generating arrays randomly, element-wise and summarising operations, sorting and filtering, vector-vector, matrix-vector and matrix-matrix multiplication in linear algebra, and finding the inverse of a matrix and solving the normal equation.
Appendix D is Introduction to Pandas, with appendix-d-pandas.ipynb, covering the main data structures of DataFrame and Series, accessing rows and columns, element-wise and summarising operations, working with missing values, and sorting and grouping.
There is a second section also labelled Appendix D, on AWS SageMaker, covering increasing the GPU quota limits and renting a Jupyter notebook with GPU in AWS SageMaker. Two sections share the letter D, which is a small editorial slip in a README that is otherwise carefully maintained.
The README also points to Machine Learning Zoomcamp, the free online course based on the book, which you can join at any moment, with more information in its own course repository.
Where mlbookcamp-code fits, and where it stops
The comparison worth making is with the free Zoomcamp course and with the general library ecosystem.
Against the course itself, the difference is that the course is the teaching experience and this repository is the artefact. The notebooks are what you open when you want to follow along, and the supplementary pages and articles at mlbookcamp.com are where the prose and the setup walkthroughs live. A reader working from the book gets the concepts and the code in separate places, which is a reasonable division and it also means the notebooks are usable on their own for someone who already knows the subject.
Against a library ecosystem, the difference is that there is nothing here to depend on. You do not add this to your requirements file. You read it, you run it, and if you want a model you retrain it in your own project. The value is the sequence and the reasoning, not the code.
The limits are honest ones for teaching code, and they come from the fact that this is a book published at a point in time. The dependencies are the ones current at the time of writing, including the TensorFlow and Keras versions of the Chapter 7 notebooks, and a reader in 2026 will hit compatibility friction that the author had not. The saved Chapter 7 models are artefacts from a specific training run, and the README does not say which framework version they load under.
The licence situation is the most significant practical limitation. The repository shows no licence file, so there is no grant of reuse rights for the notebooks, even though the book is sold commercially and the code accompanies a purchase. For a reader following along for personal study, that does not matter. For a company that wants to reuse a notebook in an internal training programme, it does, and the answer is to ask rather than to assume.
There is also no CI configuration to speak of, no test suite and no packaging. The .github/ directory at the root is the only trace of a repository workflow, and the notebooks are the deliverable.
For the intended reader, this is a well-organised companion to a book that covers a surprising amount of ground, from the first exploratory notebook to a Kubeflow deployment, and having every chapter's code in one place with its own directory is a real convenience that the book alone does not provide.
Editorial conclusion
mlbookcamp-code suits a reader working through the Machine Learning Bookcamp who wants the book's code laid out chapter by chapter rather than scattered, since each chapter has its own directory and the notebooks follow the same sequence as the text, from exploratory analysis to deployment. It is the wrong tool if you want a maintained library, since these are teaching notebooks with pinned-era dependencies and no release process, and it is the wrong tool if you need code you can put into production, which is the reason the book itself moves through Pickle, Flask, Docker and cloud deployment rather than stopping at the models. Before you start, read Appendix A on setting up the environment and use the mlbookcamp.com articles for the AWS and Kubernetes walkthroughs that the repository links rather than expecting them to be in the notebooks.
Frequently asked questions
What is the mlbookcamp-code repository?
It holds the code from the Machine Learning Bookcamp book. The repository is organised one directory per chapter, with chapter-02-car-price, chapter-03-churn-prediction, chapter-05-deployment, chapter-06-trees, chapter-07-neural-nets, chapter-08-serverless, chapter-09-kubernetes and chapter-09-kubeflow, plus three top-level notebooks for the appendices on Python, NumPy and Pandas.
Which chapters have code in the Machine Learning Bookcamp repository?
Chapter 1 on Introduction to Machine Learning has No code, and Appendix A on setting up the environment also has No code. Chapter 4 on evaluation metrics reuses the churn project and its notebook sits in the chapter-03-churn-prediction directory rather than one of its own.
How do I get the datasets for the Machine Learning Bookcamp notebooks?
Appendix A covers installing and configuring the Kaggle command line interface tool for accessing datasets from Kaggle, and also covers installing Anaconda, running a Jupyter Notebook service from a remote machine and creating an EC2 machine on AWS. Two articles on mlbookcamp.com cover creating an AWS account and renting an EC2 instance.
What deployment options does the book cover?
Chapter 5 covers Pickle for saving models, Flask for serving them, Pipenv for dependencies, Docker for a self-contained service and AWS Elastic Beanstalk for cloud deployment. Chapter 8 covers TensorFlow-Lite, AWS Lambda and API Gateway. Chapter 9 covers TensorFlow-Serving on Kubernetes and Kubeflow with KFServing.
What licence does mlbookcamp-code have?
The repository shows no licence, and the top-level entries include no LICENSE file. The README links the supplementary pages at mlbookcamp.com and directs questions about the book to the channel on datatalks.club.
Is there a free course that goes with the Machine Learning Bookcamp book?
Yes. The README points to Machine Learning Zoomcamp, a course based on the book that is online and free and that you can join at any moment, with more information in its own course repository, alongside the supplementary pages at mlbookcamp.com.
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/alexeygrigorev-mlbookcamp-code)Was this useful?