Loss functions & empirical risk
Step 2 of 21 in Machine Learning · Concept · Easy
A loss scores how wrong a prediction is; training minimizes the average loss on the training set (empirical risk). Squared error, absolute error and log-loss each encode different beliefs about errors.
Build it
Compare losses
Fit a constant to data with outliers by minimizing squared vs absolute error.
Done when: Squared gives the mean, absolute the median; you explain why.
Resources
- Wikipedia: Loss function Article
- Andrew Ng: ML Specialization Course
- ISLR / ISLP (free book) Book
Earn this star
On the map, you log what you built. Finish the step and its star lights.
Open this step on the map