@tom_doerr: Visualizes machine learning algorithms from first principles https://github.com/gavinkhung/machine-learning-visualized…
Summary
This article introduces Machine Learning Visualized, a Jupyter Book and interactive platform that implements and derives machine learning algorithms from first principles with visualizations.
View Cached Full Text
Cached at: 05/10/26, 06:22 AM
Visualizes machine learning algorithms from first principles https://github.com/gavinkhung/machine-learning-visualized…
gavinkhung/machine-learning-visualized
Source: https://github.com/gavinkhung/machine-learning-visualized
Machine Learning Visualized

URL: https://ml-visualized.com/
Machine Learning Visualized is a Jupyter Book containing Jupyter Notebooks that implement and mathematically derive machine learning algorithms from first-principles.
There are also Interactive Notebooks built with Marimo that allow you to see how the weights influence the loss functions.
The output of each notebook is a visualization of the machine learning algorithm throughout its training phase, ultimately converging at its optimal weights.
There is a separate Github Repository for each machine learning algorithm. Thus, this repository is simply the code to configure and build the Jupyter Book. At a very high level, Jupyter Books allow you to build a website with Markdown files and Jupyter Notebooks. Notice that none of the Jupyter Notebooks are in this repository. There is a SH script to download the relevant Jupyter Notebooks from other Github Repos. Once that is complete, the Jupyter Book can be built. The website is updated using the GitHub Action at .github/workflows/ci.yml after every commit or pull request. To build the website locally, see the Usage section below.
Jupyter Notebooks
- Neural Networks Repo
- Logistic Regression Repo
- Perceptron Repo
- Principal Component Analysis Repo
- K Means Repo
- Gradient Descent Repo
Jupyter Book Info
Table of Contents and structure of the book is specified at _toc.yml.
Configuration is specified at _config.yml.
For more information, check out the Jupyter Book Docs.
Usage
Step 1: Download the Jupyter Notebooks
chmod +x ./download_notebooks.sh
./download_notebooks.sh
Step 2: Building the Jupyter Book
Option 1: jupyter-book CLI
pip install -U jupyter-book
jupyter-book build .
Option 2: Docker Compose
docker compose run jupyter-book
docker compose down --volumes --rmi local
Option 3: Docker
docker build -f Dockerfile.book -t jupyter-book .
docker run --rm -v "$(pwd)":/usr/src/app jupyter-book
docker stop jupyter-book
docker rm jupyter-book
docker rmi jupyter-book
Step 3: Open the Jupyter Book
Navigate to _build/html/index.html
Build EPUB (NEW)
brew install --cask mactex
nbmerge $(ls chapter1/*.ipynb chapter2/*.ipynb chapter3/*.ipynb chapter4/*.ipynb | sort) -o book/combined.ipynb
jupyter nbconvert --to latex book/combined.ipynb
docker build -f Dockerfile.pandoc -t my-pandoc .
docker run --rm -v $(pwd):/data my-pandoc pandoc book/main.tex -o book/main.epub --mathml --embed-resources --standalone
Output
Marimo Interactive Notebooks

Mathematically Explained

Similar Articles
@DivyanshT91162: People quit Machine Learning for one reason: They open a notebook… see 200 lines of formulas… and suddenly every tutori…
The article highlights an open-source repository that rebuilds classic machine learning algorithms from first principles using Jupyter Notebooks, offering step-by-step visualizations to help learners understand the underlying mechanics rather than just copying code.
@tom_doerr: Interactive step-by-step visualizations for 24 algorithms https://github.com/TamimEhsan/AlgorithmVisualizer…
An interactive web-based tool that visualizes 24 algorithms step-by-step, covering pathfinding, sorting, recursion, and more, built with React.
@tom_doerr: Open Machine Learning course with Kaggle competitions https://github.com/Yorko/mlcourse.ai…
Promotion of mlcourse.ai, an open-source machine learning course by OpenDataScience featuring theory, practice, and Kaggle competitions.
@XAMTO_AI: What's the biggest trap in machine learning for beginners? Either the tutorials are full of fluff and leave you still confused, or they just throw code at you and you run it without understanding why. There's a gem on GitHub: Machine Learning Visualized, which directly visualizes the algorithm training process - showing how weights are updated, how they converge, etc.
Introduces the Machine Learning Visualized project on GitHub. This tool uses interactive notebooks and visualizations to show the training process of machine learning algorithms (e.g., neural networks, logistic regression, etc.), helping beginners understand the principles.
stefan-jansen/machine-learning-for-trading
The article introduces the GitHub repository for the book 'Machine Learning for Trading' (2nd edition), which provides over 150 Jupyter notebooks covering ML techniques for algorithmic trading, including feature engineering, supervised/unsupervised learning, deep learning, and reinforcement learning.