Processing math: 100%
SciPy

This is documentation for an old release of SciPy (version 0.17.1). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.special.huber

scipy.special.huber(delta, r) = <ufunc 'huber'>

Huber loss function.

huber(δ,r)={δ<012r20δ,|r|δδ(|r|12δ)otherwise
Parameters:

delta : ndarray

Input array, indicating the quadratic vs. linear loss changepoint.

r : ndarray

Input array, possibly representing residuals.

Returns:

res : ndarray

The computed Huber loss function values.

Notes

This function is convex in r.

New in version 0.15.0.