Skip to contents

binary cross entropy

Usage

crossentropy(y, p)

Arguments

y

true label (0/1)

p

predicted probability

Note

-(y * log(p) + (1 - y) * log (1 - p))