loss_huber: Huber Loss

View source: R/losses.R

loss_huberR Documentation

Huber Loss

Description

Creates a Huber loss function object.

Usage

loss_huber(delta = 1)

Arguments

delta

A positive numeric value controlling the transition point between squared and absolute loss behavior.

Value

An object of class "met_loss".

References

Huber, P. J. (1964). Robust Estimation of a Location Parameter. The Annals of Mathematical Statistics, 35(1), 73–101. doi:10.1214/aoms/1177703732

Examples

loss <- loss_huber(delta = 1)
loss$fn(c(1, 2, 3), c(1.1, 1.9, 3.2))

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