Loss Functions — ML Glossary documentation

PHOTO EMBED

Tue Dec 14 2021 02:11:23 GMT+0000 (Coordinated Universal Time)

Saved by @zhangyu

def CrossEntropy(yHat, y):
    if y == 1:
      return -log(yHat)
    else:
      return -log(1 - yHat)
content_copyCOPY

https://ml-cheatsheet.readthedocs.io/en/latest/loss_functions.html