mrdbourke / tensorflow-deep-learning

All course materials for the Zero to Mastery Deep Learning with TensorFlow course.
https://dbourke.link/ZTMTFcourse
MIT License
5.14k stars 2.53k forks source link

Huber in Regression Evaluation Metrics #339

Open beethofen opened 2 years ago

beethofen commented 2 years ago

Hi, Daniel. Thanks for your great video! About the Huber in Regression Evauation Metrics: Screen Shot 2022-02-15 at 12 09 10 PM I found it confusing when you describe Huber in "when to use" as a combination of MAE and MSE because the first impression of mine is let's use Huber to balance the advantage and drawbacks between MAE and MSE since it's a combination. However, I found the chart here to show that Huber would be much more insensitive anytime if we compare to MAE and MSE no matter what degree it would be. Screen Shot 2022-02-15 at 12 21 05 PM The link is here: https://www.researchgate.net/figure/Comparison-of-the-MSE-MAE-and-Huber-losses_fig3_340644261 Yes, Huber does show a milder reaction to a larger value by the square. But it seems Huber is not that a "combination". Perhaps we may say it's an "improvement" or an "alternative" would be not that confusing? Thanks, Daniel!. You're the best. Learning a lot from your videos. Thanks! - Alvin

wr0ngc0degen commented 1 year ago

@beethofen the chart you cited is just one of the possible Huber loss' graphs that depends on the value of δ as you can see from the fomula from your screenshot it's indeed a combination and the main aim of Huber's loss is to "modify" MAE making it differentiable in the vicinity of 0