pysolvegn.cauchy_rho#

cauchy_rho(x)[source]#

Compute the Cauchy robust cost function \(\rho(x) = \log(1 + x)\) and its derivatives.

\[\rho'(x) = \frac{1}{1 + x}\]
\[\rho''(x) = -\frac{1}{(1 + x)^2}\]
Parameters:

x (ArrayLike) – Squared residuals \(x = \|R\|^2\). Shape (N,).

Returns:

  • rho (numpy.ndarray) – The cost function values with shape (N,).

  • rho_prime (numpy.ndarray) – The first derivatives with shape (N,).

  • rho_double_prime (numpy.ndarray) – The second derivatives with shape (N,).

Return type:

Tuple[ndarray, ndarray, ndarray]