loss_binary_crossentropy: Binary Cross-Entropy Loss

View source: R/losses.R

loss_binary_crossentropyR Documentation

Binary Cross-Entropy Loss

Description

Creates a binary cross-entropy loss function object.

Usage

loss_binary_crossentropy(epsilon = 1e-15)

Arguments

epsilon

A small positive numeric value used for numerical stability.

Value

An object of class "met_loss".

References

Bridle, J. S. (1990). Probabilistic Interpretation of Feedforward Classification Network Outputs, with Relationships to Statistical Pattern Recognition. In Neurocomputing: Algorithms, Architectures and Applications, 227–236. Springer.

Examples

loss <- loss_binary_crossentropy()
loss$fn(c(0, 1, 1), c(0.1, 0.8, 0.9))

metANN documentation built on May 16, 2026, 1:06 a.m.