Skip to content
LearnMLByDoing
Free

Learn machine learning, maths and AI by doing.

Not by reading. Every equation is wired to a live 3D scene you can rotate, drag and run. Hover a symbol and it lights up in the viewport. Write the optimizer in Python and watch your own code roll down the loss surface.

θt+1=θt−η ∇L(θt)\tok{params}{\theta_{t+1}} = \tok{params}{\theta_t} - \tok{learning_rate}{\eta}\,\tok{gradient}{\nabla\mathcal{L}(\theta_t)}

Hover the symbols. The scene on the right responds.

Built from Mathematics for Machine Learning, ISLR, Goodfellow's Deep Learning, Attention Is All You Need and the current AI and ML exam guides from Google Cloud, AWS, Microsoft, NVIDIA and Databricks.

Lab 2.1, optimizer raceSGDMomentumAdam
Compiling scene
0.080

Maths, machine learning and AI. Start where you are.

New to all of it? Begin with the maths. Know the maths already? Skip ahead. Every path is the same kind of lesson: change the variables, watch what happens, then write the code.

Maths

Learn the maths behind machine learning

Start from school-level functions and build up vectors, matrices, derivatives, gradients and probability. Then bend space with linear algebra, calculus and information theory in 3D.

Machine learning

Learn machine learning from first principles

Race optimizers down a loss surface, fit regressions and tree ensembles, then train neural networks with an autograd engine you write yourself, and agents that learn from reward.

AI

Learn how modern AI works

Open up a real, tiny GPT and follow attention, transformers and large language models through to diffusion image generators, agents and running models in production.

One workbench for the math, the picture and the code.

Symbols wired to geometry

Hover any variable in a derivation and the vector, surface or beam it names lights up in the 3D scene. Drag a slider and the equation tells you which term you moved.

softmax⁡ ⁣(QK⊤dk)V\operatorname{softmax}\!\left(\frac{\htmlData{s=q}{Q}\htmlData{s=k}{K}^{\top}}{\sqrt{d_k}}\right)\htmlData{s=v}{V}

NumPy in your browser

Python 3.12 and NumPy compiled to WebAssembly. Tests run locally, and your solver's output streams into the viewport.

$ run tests.py
first step equals lr per coordinate0.41 ms
matches reference Adam over 25 steps1.87 ms
state persists across calls0.22 ms
converges on the convex bowl6.12 ms
4/4 passed. Trajectory sent to viewport.

Progress you can audit

Challenges passed, checks mastered, streaks and XP, synced to your account.

streak 12 dxp 2,340

Textbooks and certifications, in one sequence

Each lesson cites the chapter it draws on, so you can go deeper in the original. Track 06 and the certification hub map the lessons to 8 current AI and ML exams from Google Cloud, AWS, Microsoft, NVIDIA and Databricks.

Source010203040506
Mathematics for ML
ISLR
Deep Learning (Goodfellow)
Karpathy, Zero to Hero
Attention Is All You Need
DDPM, Score SDEs
PMLE, MLA-C02, AIP-C01, AI-103 guides

Seven tracks, from eigenvectors to production AI.

Start anywhere, or begin with the optional maths primer. Every free track opens with a free interactive lab, and every lesson lists the textbook chapters it draws on.

45 of 45 lessons

Learning maths, ML and AI by doing

Learn ML by Doing — ML by doing, not by reading.

What is LearnMLByDoing?
LearnMLByDoing (people also say ML By Doing, or LMLBD) is an interactive way to learn maths, machine learning and AI. You do not read about an idea and move on: you change the variables in a live 3D visualisation, watch what happens, then write Python that runs in your browser.
Do I need to be good at maths to learn machine learning or AI?
No. The Maths Primer starts from school-level functions and builds up vectors, matrices, derivatives, gradients and probability with pictures and small numbers, exactly as far as machine learning needs them. If you already know the maths, skip it and start at any track.
Does it cover AI and LLMs, or only machine learning?
All of it, in one sequence. The 8 tracks run from the maths (linear algebra, calculus, probability) through classical machine learning and deep learning to transformers, large language models, diffusion models, reinforcement learning and MLOps, with prep for 8 current AI and ML certification exams.
Is LearnMLByDoing free?
Eleven interactive labs are free, including the whole Maths Primer, and you do not need an account to start. Pro unlocks every lesson, every Python challenge and certification prep for $19 a month or $149 a year, with local prices in pounds, euros, Canadian and Australian dollars and Polish złoty.
Do I need to install Python or own a GPU?
No. Python and NumPy run inside your browser through WebAssembly, and the 3D labs render in the page. There is nothing to install.
How is learning by doing different from a video course or a textbook?
A video or a chapter shows you one worked example. Here every lesson is a lab: drag a slider and the loss surface, the decision boundary or the attention pattern changes with it. Guided experiments tell you what to try, a Python challenge has you implement the idea, and a short check confirms it stuck. Each lesson still cites the textbook chapter it draws on, so you can go deeper in the original.

Eleven labs are free. No account needed to start.

Pro unlocks every track, every Python challenge and certification prep for $19 a month or $149 a year.