How phuijse/machinelearningbook works
1. This repository is not an application backend or service; it is a Jupyter Book–based machine learning textbook. The primary artifact is a static website generated from notebooks and Markdown-like book structure, then published to GitHub Pages.
2. The source-of-truth content lives under contents/. Each topic area is organized as a chapter-like subtree:
- supervised_learning/
- neural_networks/
- reinforcement_learning/
These folders contain the actual instructional notebooks, figures, and small supporting datasets/models.
3. The book is divided into three major educational subsystems:
- Supervised learning: linear/logistic regression, SVMs, trees, ensembles, metrics, feature engineering, validation.
- Neural networks: tensor basics, training, image handling, data augmentation, CNNs, transfer learning.
- Reinforcement learning: Q-learning, policy gradients, DQN variants, and related experiments.
This chapter structure is what should appear as the main content boundary in any architecture diagram.
4. The notebook layer is the core computation/teaching layer. Files such as *.ipynb are both narrative and executable examples. They likely mix explanatory text, plots, and code using Python libraries such as scikit-learn and PyTorch, as noted in the README. There is no separate service layer between the notebooks and the published site.
5. Data and experiment artifacts are stored close to the notebooks that use them:
- contents/neural_networks/data/food5k/ contains training/validation image data for image classification examples.
- contents/reinforcement_learning/metrics/ contains CSV logs such as rewards, loss, epsilon, and episode length.
- contents/reinforcement_learning/modelos/ contains serialized models in .pkl form.
- contents/reinforcement_learning/dqn_breakout.zip appears to be an experiment asset or environment bundle.
These are important because the book is not purely narrative; it includes reproducible ML experiments with local assets.
6. The rendering and publishing boundary is controlled by Jupyter Book configuration at the repository root:
- _config.yml defines site/book behavior.
- _toc.yml defines navigation and chapter order.
- _static/custom.css customizes presentation/styling.
- _static/ holds additional site-level assets.
This is the configuration layer that turns notebook content into a navigable book.
7. The build flow is:
- author/edit notebooks and assets in contents/
- run notebooks to produce outputs, figures, and tables
- build the book with jupyter-book build .
- publish the generated HTML with ghp-import
The output is a static site, so runtime behavior after publishing is limited to browser-side rendering of HTML/CSS/JS.
8. The repository boundary between source and generated output is important. Source files are the notebooks and config; generated content is produced into _build/html/ during compilation and is not the hand-authored source. In an architecture diagram, treat _build/ as a derived artifact, not a subsystem.
9. The README and README-described workflow indicate the project is maintained as a continuously evolving educational resource, with GitHub Pages as the deployment target. The publishing chain therefore depends on GitHub as hosting infrastructure, but the book itself does not depend on a server-side application runtime.
10. The repo also contains top-level documentation metadata:
- LICENSE
- .gitignore
- _toc.yml
- _config.yml
These support the content pipeline rather than the machine learning examples themselves. They form the minimal platform layer around the notebook chapters.
11. There is a clear separation between pedagogical content and supporting assets:
- notebooks explain concepts and contain executable demos
- data/images/models/metrics support those demos
- Jupyter Book turns both into a static publication
This separation is the main design pattern of the repository.
12. If you draw the architecture, the simplest accurate shape is: authored notebook chapters and asset folders on one side, Jupyter Book configuration and build tooling in the middle, and a static GitHub Pages site on the other side. The ML libraries are embedded inside the notebook execution layer rather than exposed as standalone components.
Main entry points: reinforcement_learning Reinforcement Learning · neural_networks Neural Networks · supervised_learning Supervised Learning · _config.yml Book config
Components 18
Content
Authored notebook chapters and their local experiment assets.
- Supervised Learning · Notebook chapter covering linear and logistic models, SVMs, trees, ensembles, metrics, features, and validation.
contents/supervised_learning - Model notebooks · Executable teaching notebooks for supervised learning workflows.
- Neural Networks · Notebook chapter for tensors, training, image handling, augmentation, CNNs, and transfer learning.
contents/neural_networks - Vision notebooks · Executable notebooks for neural network concepts and experiments.
- Food5k data · Training and validation images used by the vision examples.
contents/neural_networks/data/food5k - Reinforcement Learning · Notebook chapter covering Q-learning, policy gradients, DQN variants, and experiments.
contents/reinforcement_learning - RL notebooks · Executable notebooks for reinforcement learning methods and demos.
- Metrics logs · CSV traces for rewards, loss, epsilon, and episode length.
contents/reinforcement_learning/metrics - Saved models · Persisted policy/value artifacts used by reinforcement learning experiments.
contents/reinforcement_learning/modelos
Platform
Jupyter Book configuration, styling, and publishing workflow.
- Book config · Site and book behavior settings for the generated textbook.
_config.yml - Book TOC · Chapter order and navigation structure for the book.
_toc.yml - Custom CSS · Repository-specific styling for the rendered book.
_static/custom.css - Static assets · Additional site-level files bundled with the book build.
_static - Build book · Transforms authored notebooks and configuration into static HTML.
- Publish site · Publishes the generated HTML to GitHub Pages.
Published output
Derived static site and GitHub Pages deployment target.
- HTML build · Compiled static output produced during the book build.
- GitHub Pages · Static hosting target for the published textbook.
- Browser site · Final browser-facing textbook experience served as HTML/CSS/JS.
Connections 17
- Supervised Learning → Model notebooks: contains · Chapter content is implemented as executable notebooks.
- Neural Networks → Vision notebooks: contains · Notebook-based instruction and experiments live in the chapter.
- Neural Networks → Food5k data: uses · Vision notebooks consume the local image dataset.
- Reinforcement Learning → RL notebooks: contains · Chapter notebooks combine exposition with runnable RL code.
- Reinforcement Learning → Metrics logs: logs · Experiments write training traces and evaluation metrics.
- Reinforcement Learning → Saved models: persists · RL workflows store trained artifacts for reuse.
- Book config → Build book: configures · Site settings drive the book build.
- Book TOC → Build book: orders · Navigation structure shapes the generated book hierarchy.
- Custom CSS → Build book: styles · Custom presentation is bundled into the build.
- Static assets → Build book: bundles · Extra static files are included in the site output.
- Supervised Learning → Build book: feeds · Authored content is compiled into the static book.
- Neural Networks → Build book: feeds · Authored content is compiled into the static book.
- Reinforcement Learning → Build book: feeds · Authored content is compiled into the static book.
- Build book → HTML build: produces · The build emits the HTML site under _build/html.
- HTML build → Publish site: deploys · Generated HTML is published to the hosting target.
- Publish site → GitHub Pages: hosts · GitHub Pages serves the published book.
- GitHub Pages → Browser site: renders · Readers interact with the static site in the browser.