On 27/10/2023 01:16, Alecos Papadopoulos wrote:
In an mle command with numerical derivatives I get in the script
output
(actual example)
<<
Gradients: 2.4007 6.7772 -5.3557 -0.89559 (norm
1.96e+000)
>>
Can somebody please advise which norm is this, preferably giving also
its computation formula?
Call b is the parameter vector ad g the gradient vector, both with n
elements. Then the norm is computed as
gradnorm = sqrt(abs(b'g)/n)
I don't remember where this formula came from, Allin and I worked on
this piece of code long ago.
If you're curious to see the rest of the code, see
https://sourceforge.net/p/gretl/git/ci/master/tree/lib/src/gretl_bfgs.c
from line 1147 onwards.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
--
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------