Robustifiers
A robustifier is mainly used in the LevenbergMarquardt solver to approximate nonsmooth nonlinear least squares. This page collects the available robustifier functions.
Manopt.ArctanRobustifier — Type
ArctanRobustifier <: AbstractRobustifierFunctionA robustifier that is based on the arctangent function. Note that robustifiers act on the squared residuals within the nonlinear least squares framework, i.e., $ρ(f_i(p)^2)$.
The formula for the robustifier is given as
\[ρ(x) = \mathrm{atan}(x)\]
and its first and second derivatives read as
\[ρ'(x) = \frac{1}{1 + x^2}\]
and
\[ρ''(x) = -\frac{2x}{(1 + x^2)^2}\]
Manopt.CauchyRobustifier — Type
CauchyRobustifier <: AbstractRobustifierFunctionA robustifier that is based on the Cauchy function. Note that robustifiers act on the squared residuals within the nonlinear least squares framework, i.e., $ρ(f_i(p)^2)$.
The formula for the Cauchy robustifier is given as
\[ρ(x) = \log(1 + x)\]
and its first and second derivatives read as
\[ρ'(x) = \frac{1}{1 + x}\]
and
\[ρ''(x) = -\frac{1}{(1 + x)^2}\]
Manopt.ComponentwiseRobustifierFunction — Type
ComponentwiseRobustifierFunction{F<:AbstractRobustifierFunction} <: AbstractRobustifierFunctionA robustifier to indicate that for a certain AbstractVectorGradientFunction a robustifier should be applied component wise.
Fields
robustifier::R: the robustifier to be applied componentwise
Constructor
ComponentwiseRobustifierFunction(robustifier::AbstractRobustifierFunction)Create a new componentwise robustifier function. This wrapper avoids “double wrapping”: calling the constructor with a componentwise robustifier returns a new componentwise robustifier around the same internal robustifier, rather than nesting another layer.
Manopt.ComposedRobustifierFunction — Type
ComposedRobustifierFunction{F<:AbstractRobustifierFunction, G<:AbstractRobustifierFunction} <: AbstractRobustifierFunctionA robustifier that is the composition of two robustifier functions $ρ = ρ_1 ∘ ρ_2$.
The formulae for the first and second derivatives are
\[ρ'(x) = ρ_1'(ρ_2(x)) ⋅ ρ_2'(x)\]
and
\[ρ''(x) = ρ_1''(ρ_2(x)) ⋅ (ρ_2'(x))^2 + ρ_1'(ρ_2(x)) ⋅ ρ_2''(x)\]
Fields
ρ1::F: the first robustifier functionρ2::G: the second robustifier function
Constructor
ComposedRobustifierFunction(ρ1::F, ρ2::G) where {F<:AbstractRobustifierFunction, G<:AbstractRobustifierFunction}ρ1 ∘ ρ2Manopt.HuberRobustifier — Type
HuberRobustifier <: AbstractRobustifierFunctionA robustifier that is based on the Huber function. Note that robustifiers act on the squared residuals within the nonlinear least squares framework, i.e., $ρ(f_i(p)^2)$.
The formula for the Huber robustifier is given as
\[ρ(x) = \begin{cases} x & \text{if } x ≤ 1\\\\ 2\sqrt{x} - 1 & \text{if } x > 1\end{cases}\]
that is, its first and second derivatives read as
\[ρ'(x) = \begin{cases} 1 & \text{if } x ≤ 1\\\\ \frac{1}{\sqrt{x}} & \text{if } x > 1\end{cases}\]
and
\[ρ''(x) = \begin{cases} 0 & \text{if } x ≤ 1\\\\ -\frac{1}{2 x^{3/2}} & \text{if } x > 1\end{cases}\]
If you want to use a different threshold δ > 0, use a ScaledRobustifierFunction to scale the residuals accordingly, or even use the shorthand δ ∘ HuberRobustifier().
Manopt.IdentityRobustifier — Type
IdentityRobustifier <: AbstractRobustifierFunctionA robustifier that is the identity function, i.e., $ρ(x) = x$.
Its first and second derivatives read as $ρ'(x) = 1$ and $ρ''(x) = 0$.
Manopt.RobustifierFunction — Type
RobustifierFunction{F, G, H} <: AbstractRobustifierFunctionA struct to represent a robustifier function $ρ: ℝ → ℝ$ along with its first and second derivative $ρ'$ and $ρ''$, respectively.
Fields
ρ::F: the robustifier functionρ_prime::G: the first derivative of the robustifier functionρ_double_prime::H: the second derivative of the robustifier function
Constructor
RobustifierFunction(ρ, ρ_prime, ρ_double_prime)Generate a RobustifierFunction given the function ρ and its first and second derivative.
Manopt.ScaledRobustifierFunction — Type
ScaledRobustifierFunction{F<:AbstractRobustifierFunction, R <: Real} <: AbstractRobustifierFunctionA robustifier function whose residuals are scaled by a real value scale $s$, i.e. it considers $ρ_s(f(p)^2) = ρ(s^2⋅f(p)^2)$ for some AbstractRobustifierFunction $ρ$. The function and its derivatives hence read as
- $ρ_s(x) = s^2 ρ(x / s^2)$
- $ρ_s'(x) = ρ'(x / s^2)$
- $ρ_s''(x) = \frac{1}{s^2} ρ''(x / s^2)$
Fields
robustifier::F: the underlying robustifier functionscale::R: the scaling factors
Constructor
ScaledRobustifierFunction(robustifier::F, scale::R) where {F<:AbstractRobustifierFunction, R <: Real}scale ∘ robustifierGenerate a ScaledRobustifierFunction given a robustifier function and a scaling factor.
Manopt.SoftL1Robustifier — Type
SoftL1Robustifier <: AbstractRobustifierFunctionA robustifier that is based on the soft $ℓ_1$ norm. Note that robustifiers act on the squared residuals within the nonlinear least squares framework, i.e., $ρ(f_i(p)^2)$.
The formula for the robustifier is given as
\[ρ(x) = 2(\sqrt{1 + x} - 1)\]
and its first and second derivatives read as
\[ρ'(x) = \frac{1}{\sqrt{1 + x}}\]
and
\[ρ''(x) = -\frac{1}{2 (1 + x)^{3/2}}.\]
Manopt.TolerantRobustifier — Type
TolerantRobustifier <: AbstractRobustifierFunctionA robustifier that is based on the tolerant function. Note that robustifiers act on the squared residuals within the nonlinear least squares framework, i.e., $ρ(f_i(p)^2)$.
The formula for the robustifier is given as
\[ρ_{a,b}(x) = b\log(1+ \mathrm{e}^{(x-a)/b}) - b\log(1 + \mathrm{e}^{-a/b})\]
and its first and second derivatives read as
\[ρ'_{a,b}(x) = \frac{1}{1 + \mathrm{e}^{(a - x)/b}}\]
and
\[ρ''_{a,b}(x) = \frac{1}{4b\mathrm{cosh}^2\Bigl(\frac{(a - x)}{2b}\Bigr)}.\]
Manopt.TukeyRobustifier — Type
TukeyRobustifier <: AbstractRobustifierFunctionA robustifier that is based on the Tukey function. Note that robustifiers act on the squared residuals within the nonlinear least squares framework, i.e., $ρ(f_i(p)^2)$.
The formula for the Tukey robustifier is given as
\[ρ(x) = \begin{cases} \frac{1}{3}(1-(1-x)^3) & \text{if } x ≤ 1\\\\ \frac{1}{3} & \text{if } x > 1\end{cases}\]
that is, its first and second derivatives read as
\[ρ'(x) = \begin{cases} (1 - x)^2 & \text{if } x ≤ 1\\\\ 0 & \text{if } x > 1\end{cases}\]
and
\[ρ''(x) = \begin{cases} -2(1 - x) & \text{if } x ≤ 1\\\\ 0 & \text{if } x > 1\end{cases}.\]