Skip to content

gavinkhung/machine-learning-visualized

Repository files navigation

Machine Learning Visualized

website

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

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 up
docker compose down --volumes --rmi local

Option 3: Docker

docker build -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

Output

Marimo Interactive Notebooks

Marimo

Mathematically Explained

latex

About

ML algorithms implemented and derived from first-principles in Jupyter Notebooks and NumPy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published