It earns a place when
- Use the maths to predict how a change in an input or parameter should affect the output.
- You can evaluate it against a credible baseline.
- Its output fits the decision and data constraints.
Machine learning models · Phase 1 · Lesson 6
Recognise the roles of vectors, matrices, derivatives, probability and logarithms in model training.
Recognise the roles of vectors, matrices, derivatives, probability and logarithms in model training.
Most machine-learning maths is bookkeeping for three operations: represent data, measure error and adjust parameters.
Vectors store features, matrices store batches, a derivative gives a local slope, and a gradient points towards the direction of fastest increase. Optimisation usually moves against that gradient.
A linear model computes a dot product between a feature vector and weight vector, adds a bias, evaluates a loss and updates the weights.
When a result looks surprisingly good, inspect the split, target timing, error slices and data-generating process before celebrating.
Use this as a small experiment rather than a recipe to copy blindly. Change one thing, record the result and explain the change.
Use NumPy to create a 2 by 3 matrix, multiply it by a length-three weight vector, and inspect the output shape.
Answer from memory first. The buttons reveal feedback, but the durable step is explaining why.
1. What does a vector often represent?
2. What does a gradient describe?
3. Why are logarithms common in probability losses?
An Introduction to Statistical Learning. Use the source for the deeper treatment after you can explain the lesson's core idea without looking.