Loss function
Definition: The loss function measures the gap between a model's prediction and the expected answer: the lower it is, the better the model on that example.
Training consists of minimizing this loss across the data. The choice of loss function directly shapes what the model learns to optimize.