[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40101] fminunc outputs - gradient and hessian
From: |
jose |
Subject: |
[Octave-bug-tracker] [bug #40101] fminunc outputs - gradient and hessian not always calculated in the solutio |
Date: |
Mon, 03 Feb 2014 16:18:14 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Iron/29.0.1600.1 Chrome/29.0.1600.1 Safari/537.36 |
Follow-up Comment #1, bug #40101 (project octave):
Here is a Mercurial changeset (fminunc.diff) equivalent to the proposed
fminunc2.m with an additional modification that fixes a new problem introduced
in fminunc2.m itself. This new problem affected the cases in which the
gradient function was supplied by the user as a row vector.
An easier way to reproduce the original problem (compared to session.txt) is
as follows:
Before applying the changeset
octave:1> l=@(x) exp(sum(x.^2));
octave:2> [x,fval,info,output,grad,hess]=fminunc(l,[1 1]);
octave:3> info
info = 3
octave:4> grad
grad =
5.3428e-07
5.2937e-07
octave:5> __fdjac__(l,x,l(x),[1 1],1)
ans =
-2.4385e-09 2.4568e-09
octave:6> hess
hess =
1.49999 0.50000
0.50000 1.50001
After applying the changeset
octave:7>
octave:7>
octave:7> [x,fval,info,output,grad,hess]=fminunc(l,[1 1]);
octave:8> info
info = 3
octave:9> grad
grad =
-2.4385e-09 2.4568e-09
octave:10> hess
hess =
1.50920 0.49988
0.49988 1.49081
(file #30447)
_______________________________________________________
Additional Item Attachment:
File name: fminunc.diff Size:1 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40101>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #40101] fminunc outputs - gradient and hessian not always calculated in the solutio,
jose <=