The Problem

Learners and practitioners need a quick, paper‑ready reference for the core mathematics of machine‑learning and deep‑learning models. Scanning full textbooks or notebooks is time‑consuming, and existing web pages are often fragmented. A single, printable cheat‑sheet that consolidates notation, update rules, and tensor‑shape constraints eliminates the lookup overhead during study or interview prep.

What This Does

The repository supplies two self‑contained LaTeX projects that render to PDF:

  • main.tex together with the 20 files in sections/ builds Deep Learning Formula Cheat Sheet (main.pdf).
  • machine-learning-formula-decision-sheet.pdf is a pre‑compiled PDF for the machine‑learning sheet; its source lives in the same sections/ hierarchy (e.g., 01_notation.tex20_shape_reference.tex).

All visual assets referenced in the LaTeX source are stored under assets/preview/. The Makefile provides a convenient entry point for local compilation, while a GitHub Actions workflow (.github/workflows/build-pdf.yml) automates PDF generation on every push.

How It Is Wired

  1. Entry point – Running make (default target) or make pdf invokes the rule defined in Makefile. The rule calls the LaTeX engine (typically latexmk or pdflatex) on main.tex.
  2. File graphmain.tex includes the ordered list of sections/*.tex files via \input{sections/XX_...}. Each section contributes a logical chunk (notation, loss functions, optimizers, etc.).
  3. Asset resolution – Image commands (\includegraphics) pull PNG files from assets/preview/. No external network calls are made; all resources are version‑controlled.
  4. CI pipeline – The workflow build-pdf.yml checks out the repo, sets up a LaTeX environment using the third‑party action xu-cheng/latex-action@v3, then runs the same make command to produce the PDFs. The resulting artifacts are available to GitHub for download or further steps (e.g., release upload).
  5. Blast radius – The LaTeX compilation step is the sole runtime component. Changes to any sections/*.tex file or an asset affect the final PDF, but the process is isolated: no external services, no database, no network I/O.

No runtime code beyond the LaTeX toolchain exists, so there are no hidden side‑effects or complex dependency chains.

How To Use It

# Clone the repository
git clone https://github.com/moses-y/ml-dl-formula-cheatsheet
cd ml-dl-formula-cheatsheet

# Build both PDFs locally (requires a TeX distribution)
make pdf        # or simply `make` if the default target is pdf

The repository does not include a README command for building, but the presence of a Makefile strongly implies the above usage. After the command completes, main.pdf and machine-learning-formula-decision-sheet.pdf will appear in the root directory.

If you prefer not to install LaTeX locally, you can rely on the CI build:

  1. Push a branch to GitHub.
  2. The build-pdf.yml workflow runs automatically and produces the PDFs as artifacts.
  3. Download the artifacts from the Actions tab.

No environment variables or secret keys are required for compilation.

Real‑World Use

A data‑science team can add the PDFs to an internal wiki or print them for interview prep sessions. For example, a Jupyter notebook that documents a model’s training loop could embed a screenshot of the relevant “gradient‑descent update” formula from sections/05_loss_functions.tex, ensuring consistent notation across code and documentation.

Code Health & Issues

  • High – Third‑party GitHub Action not pinned to a commit SHA (.github/workflows/build-pdf.yml uses xu-cheng/latex-action@v3).
  • Medium – Workflow does not declare least‑privilege permissions for GITHUB_TOKEN.
  • Low – No timeout-minutes set on workflow jobs, risking overlapping runs.

Additional observations from static analysis:

  • No test suite present.
  • CI present (GitHub Actions).
  • License file included.
  • No Dockerfile, lockfile, or committed secrets.

The Bottom Line

The repo delivers a clean, LaTeX‑based source for two well‑organized formula cheat‑sheets, with a simple Makefile and CI pipeline for PDF generation. It is ready for use by anyone comfortable with a LaTeX toolchain, but it lacks automated tests and could improve CI security by pinning actions, restricting token permissions, and adding job timeouts. Ideal for educators, interview candidates, and engineers who need a portable reference, not for production‑grade software.