title: Powell's dog leg method
text: # Powell's dog leg method
  
  Powell's dog leg method, also called Powell's hybrid method, is an iterative optimisation algorithm for the solution of non-linear least squares problems, introduced in 1970 by Michael J. D. Powell. Similarly to the Levenberg–Marquardt algorithm, it combines the Gauss–Newton algorithm with gradient descent, but it uses an explicit trust region. At each iteration, if the step from the Gauss–Newton algorithm is within the trust region, it is used to update the current solution. If not, the algorithm searches for the minimum of the objective function along the steepest descent direction, known as Cauchy point. If the Cauchy point is outside of the trust region, it is truncated to the boundary of the latter and it is taken as the new solution. If the Cauchy point is inside the trust region, the new solution is taken at the intersection between the trust region boundary and the line joining the Cauchy point and the Gauss-Newton step (dog leg step).
  
  The name of the method derives from the resemblance between the construction of the dog leg step and the shape of a dogleg hole in golf.
  
  ## Formulation
  
  Given a least squares problem in the form
  
      $F({\boldsymbol {x}})={\frac {1}{2}}\left\|{\boldsymbol {f}}({\boldsymbol {x}})\right\|^{2}={\frac {1}{2}}\sum _{i=1}^{m}\left(f_{i}({\boldsymbol {x}})\right)^{2}$
  
  with $f_{i}:\mathbb {R} ^{n}\to \mathbb {R}$, Powell's dog leg method finds the optimal point ${\boldsymbol {x}}^{*}=\operatorname {argmin} _{\boldsymbol {x}}F({\boldsymbol {x}})$ by constructing a sequence ${\boldsymbol {x}}_{k}={\boldsymbol {x}}_{k-1}+\delta _{k}$ that converges to ${\boldsymbol {x}}^{*}$. At a given iteration, the Gauss–Newton step is given by
  
      ${\boldsymbol {\delta _{gn}}}=-\left({\boldsymbol {J}}^{\top }{\boldsymbol {J}}\right)^{-1}{\boldsymbol {J}}^{\top }{\boldsymbol {f}}({\boldsymbol {x}})$
  
  where ${\boldsymbol {J}}=\left({\frac {\partial {f_{i}}}{\partial {x_{j}}}}\right)$ is the Jacobian matrix, while the steepest descent direction is given by
  
      ${\boldsymbol {\delta _{sd}}}=-{\boldsymbol {J}}^{\top }{\boldsymbol {f}}({\boldsymbol {x}}).$
  
  The objective function is linearised along the steepest descent direction
  
      ${\begin{aligned}F({\boldsymbol {x}}+t{\boldsymbol {\delta _{sd}}})&\approx {\frac {1}{2}}\left\|{\boldsymbol {f}}({\boldsymbol {x}})+t{\boldsymbol {J}}({\boldsymbol {x}}){\boldsymbol {\delta _{sd}}}\right\|^{2}\\&=F({\boldsymbol {x}})+t{\boldsymbol {\delta _{sd}}}^{\top }{\boldsymbol {J}}^{\top }{\boldsymbol {f}}({\boldsymbol {x}})+{\frac {1}{2}}t^{2}\left\|{\boldsymbol {J}}{\boldsymbol {\delta _{sd}}}\right\|^{2}.\end{aligned}}$
  
  To compute the value of the parameter $t$ at the Cauchy point, the derivative of the last expression with respect to $t$ is imposed to be equal to zero, giving
  
      $t=-{\frac {{\boldsymbol {\delta _{sd}}}^{\top }{\boldsymbol {J}}^{\top }{\boldsymbol {f}}({\boldsymbol {x}})}{\left\|{\boldsymbol {J}}{\boldsymbol {\delta _{sd}}}\right\|^{2}}}={\frac {\left\|{\boldsymbol {\delta _{sd}}}\right\|^{2}}{\left\|{\boldsymbol {J}}{\boldsymbol {\delta _{sd}}}\right\|^{2}}}.$
  
  Given a trust region of radius $\Delta$, Powell's dog leg method selects the update step ${\boldsymbol {\delta _{k}}}$ as equal to:
  
  * ${\boldsymbol {\delta _{gn}}}$, if the Gauss–Newton step is within the trust region ($\left\|{\boldsymbol {\delta _{gn}}}\right\|\leq \Delta$);
  * ${\frac {\Delta }{\left\|{\boldsymbol {\delta _{sd}}}\right\|}}{\boldsymbol {\delta _{sd}}}$ if both the Gauss–Newton and the steepest descent steps are outside the trust region ($t\left\|{\boldsymbol {\delta _{sd}}}\right\|$);
  * $t{\boldsymbol {\delta _{sd}}}+s\left({\boldsymbol {\delta _{gn}}}-t{\boldsymbol {\delta _{sd}}}\right)$ with $s$ such that $\left\|{\boldsymbol {\delta }}\right\|=\Delta$, if the Gauss–Newton step is outside the trust region but the steepest descent step is inside (dog leg step).
  