scipy.special.pseudo_huber#
- scipy.special.pseudo_huber(delta, r, out=None) = <ufunc 'pseudo_huber'>#
Pseudo-Huber loss function.
\[\mathrm{pseudo\_huber}(\delta, r) = \delta^2 \left( \sqrt{ 1 + \left( \frac{r}{\delta} \right)^2 } - 1 \right)\]- Parameters
- deltaarray_like
Input array, indicating the soft quadratic vs. linear loss changepoint.
- rarray_like
Input array, possibly representing residuals.
- outndarray, optional
Optional output array for the function results
- Returns
- resscalar or ndarray
The computed Pseudo-Huber loss function values.
Notes
This function is convex in \(r\).
New in version 0.15.0.