Label smoothing and calibration
Why it matters Label smoothing is often sold as "it improves calibration". Sometimes it does. Sometimes it makes it worse. Measure, do not assume.
Label smoothing trains towards targets like 0.91 for the true class and 0.01 for each other class, instead of exactly 1 and 0. That stops the model pushing its confidence to the extreme. If the model was overconfident, that helps. If it was already underconfident, it makes things worse.
Predict first, then measure on this model.
Words and symbols in this lesson
- calibration, ECE
- whether confidence matches accuracy; the weighted average gap
Set my_prediction to "better" or "worse": will smoothing 0.1 lower the ECE here? Then compute ece_plain and ece_smooth with the given functions, and set measured to what actually happened.
Spotted a problem in this lesson? Report it · Ask about this lesson
This exercise opens soon
Finish the lesson before it and this one unlocks. The whole course is free, no account needed, and you can read this lesson right now.
This browser is blocking cookies for learn.floati.life, so lessons you finished here cannot open in order. Allow cookies for this site and reload.