Skip to content

Muhammad-waqas1/zerotoml

Repository files navigation

ZeroToML Logo

ZeroToML

Machine Learning from First Principles

A free, open-source ML curriculum — from Python setup to production deployment.
Every equation derived. Every algorithm coded from scratch. No black boxes, no paywalls.

Live Site License: MIT Modules Lessons Free PRs Welcome

→ Start Learning · Curriculum · Tools · Contributing


What is ZeroToML?

ZeroToML is a structured, end-to-end machine learning curriculum that covers everything from setting up a Python environment to deploying production ML systems to the cloud.

It's not a course. It's not a YouTube channel. It's a self-contained reference site written the way a knowledgeable friend would explain things — direct, mathematically honest, with real code that actually runs.

Every lesson follows the same structure:

  1. Intuition first — what is this thing and why does it exist?
  2. Mathematics second — the equations, rendered with KaTeX, every symbol explained
  3. Code third — working Python you can copy and run immediately

Curriculum

Nine modules, each building on the last. Start from zero, finish with a deployed ML system.

# Module Topics Lessons Level
01 Environment & Data Foundations Python, Conda, NumPy, Pandas, EDA 4 Beginner
02 Mathematical Pillars Linear Algebra, Calculus, Probability & Stats 3 Beginner
03 Feature Engineering Data Cleaning, Scaling, Encoding, Feature Selection 4 Beginner
04 Supervised Learning Regression, Classification, SVM, Trees, Ensembles 5 Intermediate
05 Unsupervised Learning Clustering, Dimensionality Reduction, Association Rules 3 Intermediate
06 Model Evaluation Bias–Variance, Metrics, Hyperparameter Tuning 4 Intermediate
07 Deep Learning Perceptrons, MLP, Backprop, CNNs, LSTMs 4 Intermediate
08 Reinforcement Learning RL Framework, Q-Learning, DQN 2 Intermediate
09 MLOps & Deployment Persistence, FastAPI, Docker, Cloud, CI/CD 4 Intermediate
Full lesson list (click to expand)

Module 01 — Environment & Data Foundations

Module 02 — Mathematical Pillars

Module 03 — Feature Engineering

Module 04 — Supervised Learning

Module 05 — Unsupervised Learning

Module 06 — Model Evaluation

Module 07 — Deep Learning

Module 08 — Reinforcement Learning

Module 09 — MLOps & Deployment


Companion Tools

Three browser-based tools built alongside the curriculum — all free, all open source, all hosted on GitHub Pages.

PyOrbit IDE — Serverless Python Data Science IDE

Run the lesson code live, instantly, in your browser.

Live Repo

A zero-backend Python Data Science IDE powered by Pyodide WebAssembly. NumPy, Pandas, and Matplotlib are pre-loaded. Open it side-by-side with any lesson, paste any code snippet, and run it immediately — no pip install, no terminal, no setup.

Feature Detail
Python 3.11 Full runtime via Pyodide WebAssembly
Data Science Stack NumPy, Pandas, Matplotlib pre-loaded
Monaco Editor VS Code engine with custom pyorbit-dark theme
Package Installer Install any micropip-compatible package on demand
Inline Plots Matplotlib figures render in the Visualisation tab
6 Code Snippets NumPy, Pandas, Matplotlib, Stats, Heatmap built in
Keyboard Shortcuts Ctrl/⌘+Enter to run · Ctrl/⌘+K to clear
Responsive Stacked layout on mobile

How to use with ZeroToML: Open PyOrbit in a second tab while reading any lesson. Paste the code blocks directly — no setup needed. Change parameters, break things intentionally, read the error messages. This is how you actually learn.


Hyperplane Hero — Interactive SVM Learning Game

Master Support Vector Machines by playing a browser game.

Live

Instead of reading dry theory, you drag a glowing hyperplane sword across a 2D feature space, rotate it to separate Red vs Blue data points, maximise the margin, and switch kernels when data isn't linearly separable.

Level SVM Concept Taught
1 Linear hyperplanes & maximum margin
2 Support vectors — what they are and why they matter
3 The Kernel Trick — RBF kernel for circular data
4 Polynomial kernel — curved decision boundaries
5 Soft margins, real-world messy data, hyperparameter C

How to use with ZeroToML: Read Lesson 4.3 — Support Vector Machines first, then play Hyperplane Hero. The game will make the math you just read feel tangible.


Rich Text → Markdown Converter

Privacy-first, browser-native markdown conversion.

Live Repo

Convert rich text and HTML to clean Markdown instantly. All processing happens in your browser — nothing sent to any server. Built with vanilla JavaScript, no frameworks, no dependencies.

Features: Real-time conversion · Full formatting support (headers, bold, italic, lists, links, tables, code blocks) · One-click copy · Download as .md · Works offline · No registration

How to use with ZeroToML: Take notes while reading lessons using any rich text editor, then convert to clean Markdown for your personal notes repository or GitHub README files.


Reference Guides

Three standalone pages that sit alongside the curriculum for lookups, architecture decisions, and production tooling.


ML Lifecycle & Architectures

Live

Real-world ML project architectures across 10 domains — each with pipeline diagrams, folder structures, artifact checkpoints, and production tips.

Domain Key Architectures
Computer Vision CNN pipelines, YOLO object detection, ViT
NLP / LLMs BERT fine-tuning, GPT APIs, RAG pipelines
Tabular ML XGBoost workflows, feature stores, drift monitoring
Generative AI Diffusion models, prompt engineering, evaluation
Time Series ARIMA, LSTM forecasting, Prophet pipelines
Recommendation Systems Collaborative filtering, two-tower models
Graph Neural Networks Node classification, link prediction
Audio ML ASR, speaker diarisation, audio classification
Anomaly Detection Isolation Forest, autoencoders, streaming
Multi-modal AI Vision-language models, fusion architectures

ML Library Cheat Sheet

Live

Syntax reference and worked examples for the nine core ML libraries: NumPy, Pandas, Matplotlib, Seaborn, Scikit-learn, XGBoost, LightGBM, PyTorch, TensorFlow/Keras. Organised by library with a function reference table and copy-paste code blocks for the most common operations.


MLOps & Deployment Reference

Live

The complete MLOps toolchain across 11 categories — cloud providers, Docker, Kubernetes, Airflow, DVC, MLflow, W&B, model serving (FastAPI, Triton, vLLM, TGI), monitoring (Prometheus, Evidently, Arize), LLMOps (LangChain, LlamaIndex, Langfuse), hardware acceleration (TensorRT, ONNX, OpenVINO), and full deployment guides for Django, Flask, and FastAPI with Kubernetes manifests.


Tech Stack

Component Technology
Frontend Vanilla HTML, CSS, JavaScript — no framework, no build step
Styling Tailwind CSS (CDN) + custom CSS properties (earthy-sky theme)
Math KaTeX (client-side LaTeX rendering)
Code highlighting Prism.js (Tomorrow Night theme)
Fonts Lora · Source Serif 4 · JetBrains Mono
Hosting GitHub Pages (free static hosting)
Lesson generator Python scripts (generate_lessons_v2.pyv5.py)

Design: Earthy Sky Coder Theme

A permanent single theme — warm parchment (#f0e9dc) backgrounds, sky blue (#4a8fa8) primary accents, sage green (#5c8a58) secondary, terracotta (#b85c2a) warnings, and night-sky (#1c1812) code blocks. Easy on the eyes for long study sessions.


Project Structure

zerotoml/
├── index.html                    # Homepage
├── about.html                    # About page
├── assets/
│   ├── css/main.css              # Full theme — earthy sky coder
│   └── js/main.js                # Nav, sidebar, ToC, progress, copy
├── lessons/                      # All 33 generated lesson pages
│   ├── 01-ml-ecosystem.html
│   ├── 01-numpy.html
│   ├── ...
│   └── 09-cloud.html
├── images/
│   └── favicon.svg
├── generate_lessons_v2.py        # Generates Modules 01-03 (11 lessons)
├── generate_lessons_v3.py        # Generates Modules 04-05 (8 lessons)
├── generate_lessons_v4.py        # Generates Modules 06-07 (8 lessons)
├── generate_lessons_v5.py        # Generates Modules 08-09 (6 lessons)
├── manifest.json                 # PWA manifest
├── _config.yml                   # GitHub Pages config
├── .nojekyll                     # Bypass Jekyll processing
├── README.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
└── LICENSE

Running Locally

No build step. No npm install. Just clone and open.

    git clone https://github.com/Muhammad-waqas1/zerotoml.git
    cd zerotoml
  • Option 1: Python simple server python3 -m http.server 8080 Open http://localhost:8080

  • Option 2: VS Code Live Server extension Right-click index.html → Open with Live Server

  • Option 3: Just open index.html directly in a browser

    open index.html

Contributing

Contributions are welcome and genuinely appreciated. See CONTRIBUTING.md for the full guide.

Quick start:

git clone https://github.com/Muhammad-waqas1/zerotoml.git
cd zerotoml
  • Edit a content string in any generate_lessons_vX.py
  • Run the generator to rebuild the HTML
  • Open a pull request

Ways to contribute:

  • Fix errors — wrong math, broken code, bad links
  • Improve explanations — clearer wording, better intuition
  • Add new lessons — follow the existing pattern
  • UI improvements — layout, accessibility, mobile
  • Translations — help make this accessible in other languages

Roadmap

  • Search across all lessons
  • Progress tracking (localStorage)
  • Printable PDF version per module
  • Quiz / self-assessment at the end of each module
  • Community notes / annotations

Related Projects by the Author

Project Description Link
PyOrbit IDE Serverless Python Data Science IDE (Pyodide + Monaco) ↗ Live · ↗ Repo
Hyperplane Hero Interactive SVM learning game ↗ Live
MD Converter Rich text → Markdown converter (privacy-first) ↗ Live · ↗ Repo

License

MIT License — see LICENSE for full text.

Free to use, share, modify, and redistribute. Attribution appreciated but not required.


Built with care by Muhammad Waqas

If ZeroToML helped you, consider giving it a ⭐ — it helps others find it.

→ Start Learning Now

About

A free, comprehensive guide to ML from mathematics to deployed models.

Resources

License

Code of conduct

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Contributors