← all demos
Computer & Data Science

Binary Cross-Entropy Loss

L = −[y ln p + (1−y) ln(1−p)]
Binary Cross-Entropy Loss

The log-loss penalty for a probabilistic prediction, drawn here for a mixed target: it is gentle near a confident correct answer but climbs steeply as the prediction heads to either wrong extreme.

Computed & rendered in pure C# on the frozen OnlyCSharp 1.8 library — animation baked to GIF with the library's own Gif encoder (no GPU, no ffmpeg, no external packages).