Loss Functions Explained: MSE, MAE and Cross-Entropy Simply
Harban AI LABS
0:00 / 0:00
Loss Functions Explained: MSE, MAE and Cross-Entropy Simply
3 просмотра · 10 дней назад
Harban AI LABS
44 подписчика
3 просмотра · 10 дней назад
Loss functions in machine learning explained: mean squared error (MSE), mean absolute error (MAE) and cross-entropy, with small examples.
A model never hears "you are wrong". It only receives one number: the loss. Choose that number badly and the model learns the wrong lesson. In this video we work through the three loss functions you will use most, with small examples computed by hand.
You will learn:
What a loss function does, and why training needs one number
Mean absolute error (MAE) and mean squared error (MSE) on the same five points
Why one outlier moves MSE far more than MAE, and how the loss decides which line wins
Cross-entropy for classification: minus the natural log of the probability given to the correct class
A worked two-class example, and why squared error is a poor fit for probabilities
How to choose a loss to match the task
Chapters
0:00 A model only hears one number
0:25 What a loss function does
1:20 Mean absolute error and mean squared error
2:23 One outlier: why MSE moves more
3:19 The loss decides which line wins
4:16 Cross-entropy for classification
5:13 Worked example with the natural log
6:06 Choosing a loss for the task
6:43 Recap + try it yourself
Try it yourself: an email really is spam, and a model gives "spam" a probability of 0.6. Find the cross-entropy loss, -ln(0.6), and write your answer in the comments.
Animations made with Manim Community Edition. The narration is a synthetic voice.
#LossFunction #MachineLearning #AIEngineer
More from Harban AI Labs: https://harban-ai-labs.vercel.app/