mlp_binary_crossentropy_gradient: Compute Binary Cross-Entropy Gradient for an MLP

View source: R/mlp_gradient.R

mlp_binary_crossentropy_gradientR Documentation

Compute Binary Cross-Entropy Gradient for an MLP

Description

Internal helper for computing the gradient of binary cross-entropy loss with respect to the MLP parameter vector.

Usage

mlp_binary_crossentropy_gradient(x, y, weights, architecture, epsilon = 1e-15)

Arguments

x

Numeric input matrix.

y

Numeric binary response vector coded as 0/1.

weights

Numeric parameter vector.

architecture

MLP architecture object.

epsilon

Small value used for numerical stability.

Value

A list containing loss, predictions, and gradient vector.


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