[R] hessian in solnp

Ivan Krylov kry|ov@r00t @end|ng |rom gm@||@com
Thu Apr 28 12:30:00 CEST 2022


В Thu, 28 Apr 2022 00:16:05 +0200 (CEST)
CAMARDA Carlo Giovanni via R-help <r-help using r-project.org> пишет:

> when a constraint is added, hessian matrix is obviously changing, but
> in a way I don't understand. 

Isn't it the point of augmented Lagrange multiplier, to solve the
constrained optimisation problem by modifying the loss function and
optimising the result in an unconstrained manner? Apologies if I
misunderstood your question.

Starting on
<https://github.com/cran/Rsolnp/blob/4b56bb5cd7c5d1096d1ba2f3946df7afa9af4201/R/subnp.R#L282>,
we can see how the functions are called: both the loss and the
constraint function are concatenated into the `obm` vector (if there's
no constraint, the function returns NULL, which is eaten by
concatenation), which form the vectors `g` (seems to be the gradient)
and `p`, which, in turn, form the matrix `hessv`.

My reading of the code could be wrong (and so could be my understanding
of augmented Lagrangian methods). Contacting maintainer('Rsolnp') could
be an option; maybe there's some documentation for the original MATLAB
version of the code at <https://web.stanford.edu/~yyye/Col.html>?

-- 
Best regards,
Ivan



More information about the R-help mailing list