bfortuner / ml-glossary

Machine learning glossary
http://ml-cheatsheet.readthedocs.io
MIT License
3.01k stars 723 forks source link

Fix: loss_functions.py --> Hinge Loss #113

Closed ghost closed 3 years ago

ghost commented 3 years ago

In the documentation, y is binary (={0, 1}). The Hinge loss presented was the Hinge loss corresponding to a {-1, +1}. I think the error came from a bad Copy-Paste from Wikipedia (https://en.wikipedia.org/wiki/Hinge_loss) where they use a {-1, +1} notation for classes. In the original version of the code, you can even notice that Hinge Loss == 1 for y = 0 NO MATTER WHAT yhat is !

bfortuner commented 3 years ago

Thanks!