What is ZeroToML?
ZeroToML is a free, structured, end-to-end machine learning curriculum hosted on GitHub Pages. It covers everything from setting up a Python environment and understanding NumPy arrays, all the way to training neural networks, building production REST APIs, containerising with Docker, and deploying to AWS.
It is not a course. It is not a YouTube channel. It is a self-contained reference site — written the way you'd want a knowledgeable friend to explain things: direct, mathematically honest, with real code that actually runs.
Every lesson follows the same structure: intuition first (what is this thing and why does it exist?), mathematics second (the equations, rendered with KaTeX), and code third (working Python you can copy and run immediately).
Who Built It?
ZeroToML was built by Muhammad Waqas — a self-taught developer who went through the ML learning process the hard way: watching scattered YouTube videos, reading documentation that assumed too much prior knowledge, and finding that "beginner" tutorials skipped the parts that actually matter.
After building several tools and going through the process of genuinely understanding ML from first
principles, the goal became clear: build the resource that should have existed. A single place where
someone with solid Python knowledge can sit down and, module by module, become a machine learning
practitioner — not just someone who can call model.fit().
All tools built alongside ZeroToML — PyOrbit IDE, Hyperplane Hero, and the Markdown Converter — are also free, open source, and hosted on GitHub Pages. The philosophy is consistent: useful tools should be free and should run in the browser.
github.com/Muhammad-waqas1The Teaching Philosophy
Most ML tutorials fall into one of two failure modes. The first is hand-waving — "the neural network just learns!" — which leaves you unable to debug anything or understand why your model isn't working. The second is academic overload — theorems and proofs before any context — which loses most people before they see why any of it matters.
ZeroToML takes a different approach: every concept starts with a real-world question that makes you want the answer. Then the math is introduced as the precise answer to that question. Then the code shows you how to implement it. This order is intentional — by the time you read an equation, you already know what it's trying to say.
The other principle is "no black boxes at the cost of understanding." We implement linear regression from scratch in NumPy before ever touching scikit-learn. We write a backpropagation loop in raw Python before opening Keras. We build a Q-Learning agent with a plain dictionary before loading Stable-Baselines3. The goal is that when you use the abstraction, you understand exactly what it's doing underneath.
The Curriculum — All 9 Modules
The curriculum is structured as a single continuous path. Each module's final lesson links to the first lesson of the next. You can also jump directly to any module if you already have the prerequisites.
Module 01 — Environment & Data Foundations
The unsung prerequisite. Before any algorithm, you need a reproducible workspace, fast numerical computation, and fluency with tabular data. This module covers Conda environments, Jupyter/VS Code setup, NumPy arrays and broadcasting, Pandas DataFrames and GroupBy, and a full EDA workflow with Matplotlib and Seaborn — including outlier detection, missing value analysis, and correlation heatmaps.
Module 02 — Mathematical Pillars
The three mathematical foundations that ML is built on: linear algebra (vectors, matrix multiplication, the normal equation, eigenvalues), calculus (derivatives, partial derivatives, the gradient, chain rule, and gradient descent from scratch), and probability & statistics (Bayes' theorem, PDFs/CDFs, key distributions, and hypothesis testing — including how to detect data drift with the KS test).
Module 03 — Feature Engineering
The art that separates good models from great ones. Covers the MCAR/MAR/MNAR framework for missing data, KNN imputation, data type fixes, IQR outlier clipping, the three scalers (Standard, MinMax, Robust) and when to use each, the most common data leakage mistake, one-hot and target encoding with proper K-fold protection, and feature selection via filter/wrapper/embedded methods plus PCA.
Module 04 — Supervised Learning
The deep dive. Simple and multiple linear regression (including the normal equation derivation), polynomial regression with regularisation, logistic regression and cross-entropy loss, KNN with decision boundary visualisation, SVMs from hard-margin through kernels, CART decision trees (Gini impurity, entropy, pruning), and ensemble methods — Random Forest, XGBoost, LightGBM, and CatBoost all benchmarked side-by-side.
Module 05 — Unsupervised Learning
K-Means with elbow method and silhouette scoring, hierarchical clustering with all four linkage types and full dendrogram, DBSCAN with the k-distance graph trick for picking epsilon. For dimensionality reduction: PCA (with scree plot and cumulative variance), t-SNE (with its limitations clearly explained), and LDA as supervised dimensionality reduction. Plus Apriori and ECLAT for association rule learning — support, confidence, and lift explained clearly.
Module 06 — Model Evaluation & Optimization
Bias-variance decomposition with learning curves and validation curves. The confusion matrix and everything derived from it: precision, recall, F1, ROC-AUC, PR-AUC. Regression metrics: MAE, MSE, RMSE, R², and MAPE — with residual analysis. Hyperparameter tuning: GridSearchCV, RandomizedSearchCV with continuous distributions, and Bayesian optimisation with Optuna (including parameter importance plots).
Module 07 — Deep Learning
Built from the ground up. Perceptron from scratch in NumPy, all activation functions with their derivatives plotted. MLP architecture with Keras Sequential API, BatchNorm, Dropout, EarlyStopping. Manual backpropagation through a two-layer network — every gradient derived. Five optimisers benchmarked. CNNs on MNIST with two conv blocks. LSTMs and GRUs for time-series. Transfer learning with frozen MobileNetV2.
Module 08 — Reinforcement Learning
The RL framework: agent, environment, state, action, reward, policy, discounted return, and the Bellman equation. Full tabular Q-Learning on FrozenLake — Q-table, epsilon-greedy, convergence plot. DQN from scratch in TensorFlow with experience replay buffer and target network. Double DQN, Dueling DQN, Prioritised Replay, and Rainbow explained. Stable-Baselines3 for production.
Module 09 — MLOps & Deployment
The finish line. Saving models with Joblib + Pickle, versioning artefacts with JSON metadata. Building a FastAPI service with Pydantic validation, batch endpoints, health checks, and Pytest tests. Dockerfile best practices (slim base, layer order, non-root user, HEALTHCHECK), Docker Compose for multi-service setup, pushing to ECR. Deploying to Streamlit Community Cloud, Render, and AWS (EC2/ECS/Lambda). GitHub Actions CI/CD — test → build → push → deploy on every commit.
Companion Tools
Three tools were built alongside the curriculum. They are all standalone — you don't need ZeroToML to use them — but they integrate naturally with the learning path.
PyOrbit IDE — Run the Lesson Code Instantly
PyOrbit is a
zero-backend Python Data Science IDE that runs entirely in your browser via Pyodide WebAssembly. NumPy,
Pandas, and Matplotlib are pre-loaded. You can paste any code snippet from any ZeroToML lesson and
execute it without installing anything. Features include the Monaco Editor (VS Code's engine) with a
custom dark theme, inline Matplotlib visualisations, an on-demand package installer for any
micropip-compatible library, six built-in code snippets, resizable panels, and
Ctrl+Enter to run.
How to use with ZeroToML: Open PyOrbit in a second browser tab. As you read a lesson, copy any code block into the editor and run it. Change the parameters. Break it on purpose and read the error. This active experimentation is the difference between reading about ML and actually learning it.
Hyperplane Hero — Master SVMs Through Play
Hyperplane Hero is a browser-based game that teaches Support Vector Machines through direct manipulation. You drag a glowing hyperplane across a 2D feature space, rotate it to separate red and blue data points, and maximise the margin. Five levels, each teaching a new SVM concept: linear hyperplanes and maximum margin, support vectors, the RBF kernel for circular data, polynomial kernels for curved boundaries, and soft margins with the 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 — you'll physically feel why the margin matters and what kernels are actually doing.
Rich Text → Markdown Converter — For Taking Notes
The Markdown Converter is a privacy-first browser tool that converts rich text and HTML to clean Markdown instantly. Full formatting support — headers, bold, italic, lists, links, tables, and code blocks. Everything processes locally in your browser; nothing is sent to any server. It works offline once loaded.
How to use with ZeroToML: Take notes in any rich text editor or paste copied content from the web, then convert to clean Markdown to keep in your personal notes repo. It's also useful for converting HTML documentation or rich-text ML reports to Markdown for GitHub READMEs.
ML Lifecycle & Architectures
The ML Lifecycle page covers real-world project architectures across ten domains: Computer Vision, NLP/LLMs, Tabular ML, Generative AI, Time Series, Recommendation Systems, Graph Neural Networks, Audio ML, Anomaly Detection, and Multi-modal AI. Each domain includes an end-to-end pipeline diagram, a recommended folder structure, artifact checkpoints at every stage, and production tips.
How to use with ZeroToML: Work through the curriculum modules first, then consult the ML Lifecycle page to see how those concepts compose into complete production pipelines — bridging the gap between understanding an algorithm and architecting a real system.
ML Library Cheat Sheet
The Cheat Sheet is a single-page syntax reference for the nine libraries that cover the full ML workflow: NumPy, Pandas, Matplotlib, Seaborn, Scikit-learn, XGBoost, LightGBM, PyTorch, and TensorFlow/Keras. Each library section includes a function reference table, worked code examples with explanations, and common gotchas.
How to use with ZeroToML: Use it as a lookup during any lesson when you can recall what a function does but not its exact signature. It is intentionally not a tutorial — the curriculum handles that — but a reference you return to repeatedly during active coding.
MLOps & Deployment Reference
The MLOps page maps the complete production ML toolchain across eleven categories: cloud providers, containerisation, data pipelines, version control for data and models, experiment tracking, CI/CD, model serving, monitoring, LLMOps, hardware acceleration, and a hands-on deployment guide with full working examples for Django, Flask, and FastAPI.
How to use with ZeroToML: Module 09 covers deployment conceptually; the MLOps page is the companion reference that goes deeper into every tool decision you will encounter when moving from a trained model to a running production service. Read it in parallel with Module 09 or return to it when a specific infrastructure question arises.
Technical Stack
ZeroToML is intentionally built with the smallest possible dependency footprint — no build tools, no bundlers, no frameworks. The entire site is static HTML, CSS, and vanilla JavaScript that deploys directly to GitHub Pages.
assets/css/main.css via CSS custom properties.main branch. Custom domain
compatible.generate_lessons_v2.py through
v5.py). Edit content strings, re-run, pages update.Design — The Earthy Sky Coder Theme
The visual design is called the Earthy Sky Coder theme — a permanent single theme (no
dark/light toggle). The palette is built around warm parchment backgrounds (#f0e9dc), sky
blue primary accents (#4a8fa8), sage green secondary accents (#5c8a58),
terracotta warning tones (#b85c2a), and night-sky code blocks (#1c1812). The
contrast is warm and easy to read for long study sessions.
All design tokens are CSS custom properties defined in assets/css/main.css. The three-column
layout on lesson pages (curriculum sidebar + main content + table of contents) collapses cleanly on
smaller screens — the sidebar becomes a slide-in overlay on tablet and the ToC hides below 1280px.
How to Contribute
ZeroToML is fully open source under the MIT license. Contributions are welcome and genuinely appreciated. The easiest way to contribute is to add a lesson or fix an error in an existing one.
Each lesson is a Python string in one of the generator scripts (generate_lessons_v2.py
through v5.py). You edit the string, run the script, and the HTML page is regenerated. No
frontend build step required.
If you find a mathematical error, an incorrect code snippet, a broken link, or a concept that could be explained more clearly — open an issue or submit a pull request. Every correction matters.
Get Started
The curriculum is designed to be read in order, but each module is also self-contained enough to jump to if you have the prerequisites. Here are three entry points depending on where you are: