Prev: export data sheet with dependecies, comments, file names and paths
Next: ordered logit or probit
From: Susan on 14 May 2010 21:22 Hello, I am using fminunc in Matlab as follow, options=optimset('MaxFunEvals',1e+5, 'MaxIter',1e+5, 'LargeScale', 'off'); [x,feval(nf),exitflag,output]=fminunc(@(x)func(x),prm0,options); And I am using Gauss optmum as follow to do the same optimization exercise: _opalgr=2; _output=1; {x,f,g,retcode}=optmum(&funzio,prm0); _opalgr=2 means I am using the BFGS as well. And max iteration is set as 1e+5. However the results are very different from each other. So here are two questions I would ask for help: 1. Does anyone have any idea why this happen? 2. I am trying to compare the function value, gradient and step length of each iteration from the two optimization process. In Gauss it could be done by setting output to be one. But how to do that in Matlab? The output only gives me the aggregated information. Thanks in advance!
From: Susan on 15 May 2010 11:49 I now know that I can set 'Display' as 'iter' to view result of each iteration in Matlab. But still can not see the gradient and step of each parameter. Anybody help here? "Susan " <tigger430060(a)googlemail.com> wrote in message <hsksvs$ro0$1(a)fred.mathworks.com>... > Hello, I am using fminunc in Matlab as follow, > options=optimset('MaxFunEvals',1e+5, 'MaxIter',1e+5, 'LargeScale', 'off'); > [x,feval(nf),exitflag,output]=fminunc(@(x)func(x),prm0,options); > > And I am using Gauss optmum as follow to do the same optimization exercise: > _opalgr=2; > _output=1; > {x,f,g,retcode}=optmum(&funzio,prm0); > > _opalgr=2 means I am using the BFGS as well. And max iteration is set as 1e+5. > > However the results are very different from each other. > > So here are two questions I would ask for help: > 1. Does anyone have any idea why this happen? > 2. I am trying to compare the function value, gradient and step length of each iteration from the two optimization process. In Gauss it could be done by setting output to be one. But how to do that in Matlab? The output only gives me the aggregated information. > > Thanks in advance!
From: Matt J on 15 May 2010 16:56 "Susan " <tigger430060(a)googlemail.com> wrote in message <hsmfph$5jf$1(a)fred.mathworks.com>... > I now know that I can set 'Display' as 'iter' to view result of each iteration in Matlab. > But still can not see the gradient and step of each parameter. > > Anybody help here? ========= Use optimset to set the OutputFcn parameter. You can use it to display whatever you like (see "help optimset")
|
Pages: 1 Prev: export data sheet with dependecies, comments, file names and paths Next: ordered logit or probit |