Key Ideas
1Loss Function. A function that measures how wrong a model's predictions are compared to the actual values; training a model means trying to minimize this function.
2Gradient Descent. An optimization algorithm that repeatedly adjusts a model's parameters in the direction that most reduces the loss function, using its gradient (derivative).
3Learning Rate. A small constant that controls how big each step is during gradient descent; too large risks overshooting, too small makes training very slow.
4Vectors and Matrices in ML. Data (like an image or a row of features) is typically represented as a vector, and datasets as matrices, so that models can use fast matrix operations to make predictions.
5Overfitting. When a model learns the training data too precisely, including its noise and quirks, causing it to perform poorly on new, unseen data.
Worked Examples
A model has a parameter w=5, learning rate 0.1, and the gradient of the loss at w=5 is 4. Find the updated parameter.
w_new = 4.6
Why is the learning rate important in gradient descent?
It balances training speed against the risk of overshooting the optimal solution
A model achieves 99% accuracy on training data but only 60% on new test data. What problem does this indicate?
Overfitting