Week 1

Stage 7 · Weeks 42–51 · math

Math for Machine Learning

Understand the math used by ML

Locked

Scored stage progress

0%

Practice and implementation

0/7

Exercises + milestone requirements owned by this stage

Evidence and gate

0 · 0/16

Artifacts · checked requirements

Why it matters

Purpose of this stage

Primary goal: operational understanding, not proof-heavy mathematics.

Subjects

4 subjects · 34 canonical topics

Each subject states what you should be able to do, an order to work through it in, what to watch for, and the questions a reviewer should be able to ask you at the end. None of it is tracked or scored.

How to work through this subject

An order that works, not a checklist. Nothing here is tracked — the steps sequence this subject’s own topics and add none.

  1. Rearrange a handful of equations by hand until isolating a variable is automatic.
  2. Sketch a function from its formula, then read a graph back into a formula.
  3. Work through exponents and logarithms until you can convert between them without hesitating.
  4. Translate three summations into loops and three loops into summations.
  5. Finish by reading one formula from a later stage's material and saying, in words, what it computes.

What to watch for

  • Summation notation appears in every loss function you will meet. Being slow at reading it will slow everything down.
  • Logs turn products into sums — that is why they appear throughout probability and loss functions.
  • A function is a rule, a graph is a picture of it, and a formula is a way of writing it. Moving between the three is the skill.
  • Exponential growth is proportional to current size. That single sentence explains most of where exponentials appear.
  • Do this with pen and paper. Reading about algebra is not the same as being fluent in it, and fluency is what later stages assume.

Curriculum topics

equations
Statements that two expressions are equal, and the rearranging that solves them.
functions
A rule mapping each input to exactly one output — the mathematical sense, which every model is an instance of.
graphs
The visual shape of a function, showing how output changes with input.
exponents
Repeated multiplication, and the growth behaviour it produces.
logarithms
The inverse of exponentiation. Logs turn products into sums, which is why they appear throughout probability and loss functions.
summation notation
The Σ symbol for adding a sequence of terms — read it as the loop it stands for.

Resources for this subject

  • REFERENCEKhan Academy Math Khan Academy
    Algebra, functions, exponents and logarithms at whatever level you actually need. Use the practice exercises; watching the videos without doing them is the failure mode this stage exists to prevent.
    Open
Need another explanation?1 more reference
  • OPTIONALMathematics for Machine Learning and Data Science DeepLearning.AI
    An optional structured course covering the same four subjects as one sequence. Take it instead of the Khan Academy path if you prefer a single guided track, not in addition to it.
    Open

A reviewer should be able to answer these

Answer from memory, out loud, before moving on. These are not tracked and do not affect the gate — they tell you whether you actually understand this subject.

  1. What does a logarithm let you do to a product, and why is that useful?
  2. How do you read a summation with an index, and what would the equivalent loop be?
  3. What does it mean for a function to be monotonic, and why would that matter for a score?
  4. Why do exponentials appear when things grow proportionally to their current size?
  5. How would you rearrange an equation to isolate the variable you care about?
  6. What does a function's graph tell you that its formula does not, and the other way round?

Exercises

Demonstrated practice · 35% base weight
This stage defines implementation through its owned project milestone rather than a separate exercise list.

Stage project

Only milestones owned by Stage 7 count here

P4 · Stage project

ML From Scratch

Project detail

with NumPy.

P4.M1 · NumPy-only regression

Resources

0% progress weight

Resource status is a convenience marker only. It cannot change competencies, gates, or stage completion — in any tier below.

References

4 available
  • REFERENCEKhan Academy Math Khan AcademyAlgebra, functions, exponents and logarithms at whatever level you actually need. Use the practice exercises; watching the videos without doing them is the failure mode this stage exists to prevent.Open
  • REFERENCEStatistics & Probability Khan AcademyProbability, distributions, sampling and correlation, with exercises. The conditional-probability and base-rate material is the part that decides whether later metrics mean anything to you.Open
  • REFERENCELinear Algebra Khan AcademyVectors, matrices, dot products and transformations. Work the vector and matrix-multiplication exercises by hand — shape intuition built here is what makes Stage 9 debuggable.Open
  • OPTIONALMathematics for Machine Learning and Data Science DeepLearning.AIAn optional structured course covering the same four subjects as one sequence. Take it instead of the Khan Academy path if you prefer a single guided track, not in addition to it.Open
Need another explanation?3 supplementary resources · not part of the canonical library

Use these for a demonstrated gap, not as a parallel course. They are authored additions and can never be the primary resource for a subject.

  • REFERENCEMathematics for Machine Learning Deisenroth, Faisal & OngFree textbook covering exactly the ML-relevant subset of the maths. Denser than Khan Academy; use it to go deeper on one topic, not as the main path.Open
  • REFERENCEEssence of Linear Algebra 3Blue1BrownBuilds the geometric intuition behind matrix multiplication and transformations, which the gate requires you to explain.Open
  • REFERENCESeeing Theory Brown UniversityInteractive visualisations of probability and sampling. Particularly good for conditional probability, where intuition usually fails.Open

Stage gate

Readiness assessment

Not ready

Stage-specific requirements

Answer each prompt without notes. Expand a question only when you are ready to check your answer.
0/8
  • Explain why dot products appear in ML
    Answer

    A dot product multiplies two vectors elementwise and sums the result, producing a single number that grows with agreement between them. That makes it a similarity score, which is why it appears wherever things are compared or combined: a weighted sum of features, a projection onto a direction, or the similarity between two representations. Divide out the magnitudes and you have cosine similarity, which compares direction alone.

  • Explain why scaling can matter
    Answer

    Features on wildly different scales distort any method that combines or compares them. Distance-based methods are dominated by the largest-range feature, and gradient descent on an elongated loss surface zigzags and converges slowly. Scaling makes the features comparable, which changes both the geometry the optimizer walks and the meaning of a distance.

  • Explain what a derivative tells you
    Answer

    A derivative is the rate of change of a function at a point: how much the output moves for a small move in the input. Its sign says which way the function is heading and its magnitude says how steeply. That is exactly the information needed to decide which direction reduces a loss.

  • Explain what a gradient tells you
    Answer

    A gradient collects the partial derivatives with respect to every parameter into one vector, and it points in the direction of steepest increase. Taking a step in the opposite direction is what reduces the loss. It is a direction with a magnitude, not a value of the function itself.

  • Explain why gradient descent can fail
    Answer

    It can fail because the surface has more than one dip and it settles in a local one, because the learning rate is too large and it overshoots or diverges, or because the rate is too small and it never arrives. Poorly scaled features make the surface elongated so it zigzags, flat regions give it almost no signal, and a badly chosen starting point can put it somewhere unhelpful.

  • Explain mean vs variance
    Answer

    The mean is the centre of a distribution; the variance is how far values typically sit from that centre, in squared units. Two datasets with the same mean can behave completely differently, which is why quoting a mean alone hides the shape. Standard deviation is the square root of the variance and is in the original units.

  • Explain conditional probability
    Answer

    Conditional probability is the probability of one event given that another is known to have occurred, which restricts attention to the cases where the condition holds. It is where intuition usually fails, because a rare condition changes the answer dramatically: a test with a high detection rate can still produce mostly false positives when the underlying rate is low. Ask what the base rate is before trusting any conditional claim.

  • Explain correlation is not causation
    Answer

    Correlation says two quantities move together; causation says changing one changes the other. Correlation can arise from a common cause, from selection in how the data was collected, or from coincidence. To claim causation you need an intervention or a design that rules out the alternative explanations, not a stronger correlation.

Universal requirements

The eight conditions 01_LEARNING_RULES.md applies to every stage. Expand one to see what it actually asks for.
0/8
  • Core concepts can be explained from memory.
    What this asks for

    Every subject in this stage has review questions. The condition is met when you can answer them out loud, without notes and without looking anything up, in your own words rather than a recited definition. An explanation you can only give with the material open is recognition, not recall.

  • Required exercises are complete.
    What this asks for

    Complete means each exercise satisfies its stated requirements and its done-when criteria, not that you attempted it. Where an exercise says you should be able to explain or defend something, that explanation is part of completing it. A stage whose source lists no exercises meets this through its owned project milestone instead.

  • Stage project works.
    What this asks for

    Works means it runs end to end from a clean checkout, on the inputs it was built for, with the failure cases it claims to handle actually handled. It is not a notebook that produced a result once. Someone else following your README should be able to run it without asking you a question.

  • Tests or verification exist.
    What this asks for

    There is something that would fail if the behaviour regressed, and you have watched it fail. That can be automated tests or a written verification procedure with recorded results, depending on what the stage produces. A test that has only ever passed is evidence of nothing.

  • README explains decisions.
    What this asks for

    The README says what the project is, how to install, run and test it, and why it is built the way it is: the choices you made, the alternatives you rejected, and what you deliberately left out. A list of commands with no reasoning does not meet this condition.

  • You can reproduce the core implementation without copying.
    What this asks for

    Delete the central piece and write it again from an empty file, without your previous version, a tutorial, or generated code in front of you. It does not have to be identical, it has to work and you have to be able to explain every line. This is the condition that separates having finished from being able.

  • You pass the stage self-assessment at >= 80%.
    What this asks for

    Record a gate exam and score yourself honestly against the dimensions the roadmap defines: recall, implementation, debugging, testing and design judgment. Elapsed time, hours watched and completed resources count for nothing here. Checking the boxes without a recorded exam does not open the gate.

  • Claude/ChatGPT reviewer finds no foundational blocker.
    What this asks for

    Ask an AI reviewer to examine the work against this stage's concepts and report foundational misunderstandings, not style. A foundational blocker is a misconception that later stages would build on, such as leakage, a broken abstraction, or an explanation that is confidently wrong. Nothing in that class may remain open when you pass.

Recorded exam

No exam recorded. Checking every requirement is not sufficient.

Evidence

Artifacts linked to this stage

Add evidence
No stage evidence yet.