A mathematical function that measures how far a model's predictions are from the correct answers, used to guide training.
Friendly Description: A loss function is the AI's report card. It measures how wrong the model's guesses are, giving training a clear target: "make this number smaller." Different loss functions are used for different kinds of jobs (predicting numbers vs. choosing categories, for example), but they all serve the same purpose, telling the model how badly it goofed so it can do better next time.
Example: When training a model to predict tomorrow's temperature, the loss function might be the average difference between predicted and actual temperatures. If the model says 72°F and the real temperature is 75°F, the loss is 3°F. The training process keeps adjusting the model to push that average error as low as possible.