Basics of Machine Learning
This chapter covers the core mathematical machinery of machine learning: the objective functions we optimize, the algorithms that optimize them, and the techniques that ensure models generalize.
- Loss Functions -- Cross entropy, KL divergence, and the mathematics of measuring prediction error
- RL Algorithms for LLMs -- PPO, DPO, GRPO, and RLOO for reinforcement learning from human feedback
- Gradient Descent -- Optimization algorithms: SGD, momentum, Adam, and convergence analysis
- Backpropagation -- The chain rule on computational graphs: forward pass, backward pass, and gradient flow
- Regularization -- Controlling model complexity: L1/L2 penalties, dropout, early stopping, and the bias-variance tradeoff