bfgsmin
Bertrand Roessli
bertrand.roessli at psi.ch
Tue Mar 17 03:12:48 CDT 2009
Hello,
I compiled everything (mkoctifle) from the SVN repository but it is not
better. The bfgsmin_example.m works perfectly, but my function not.
The funny thing is that bfgsmin makes a few cycles, chi2 is not modified
as the parameters are not varied and then crashes as soon as there is a
change in the parameters.
octave:1> leasqrexamp
chisq = 1.8953
p =
11
1
chisq = 1.8953
p =
11
1
chisq = 1.8953
p =
11.0000
1.0000
chisq = 1.8953
p =
11.0000
1.0000
chisq = 1.8953
p =
11.0000
1.0000
chisq = 1.8953
p =
11.00000
0.99999
error: __bfgsmin_gradient: gradient contains NaNs or Inf
error: feval: function `chi2' not found
error: octave_base_value::double_value (): wrong type argument `<unknown
type>'
warning: __bfgsmin_obj: objective function could not be evaluated -
setting to DBL_MAX
error: feval: function `chi2' not found
Thanks,
Bertrand
On Mon, 2009-03-16 at 10:02 -0700, Michael Creel wrote:
>
>
> Bertrand Roessli wrote:
> >
> > Sorry I do not get it,
> >
> > "Just download that file to your working directory,"
> >
> > which file?
> >
> > If you mean from optim-1.04, it is what I did before.
> >
> > Bertrand
> >
> > On Mon, 2009-03-16 at 07:00 -0700, Michael Creel wrote:
> >>
> >> Bertrand Roessli wrote:
> >> >
> >> > Hello,
> >> >
> >> > Thanks for trying the code.
> >> >
> >> > I have the latest package from octave sourceforge (optim 1.04) and
> >> > octave 3.1.54.
> >> >
> >> >
> >>
> >> It seems that the optim package was last released in August of 2008,
> >> while
> >> the last change to __bfgsmin.cc was in October 2008. I just ran your code
> >> 10
> >> times without problems, so I think that the problem is a bug in the old
> >> version of __bfgsmin.cc. Just download that file to your working
> >> directory,
> >> run mkoctfile __bfgsmin.cc, and I think you'll be set.
> >> Michael
> >>
> >> p.s., I have not tested it with Octave 3.1.x,
> >>
> >
> > _______________________________________________
> > Help-octave mailing list
> > Help-octave at octave.org
> > https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
> >
> >
>
> You can browse the SVN repository to get individual files. __bfgsmin.cc is
> here:
> http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/optim/src/__bfgsmin.cc?view=log
>
> Just click on that, then download the latest version. You can browse around
> the SNV repo to see the stucture, if you're curious. Because __bfgsmin.cc is
> written in C++, it needs to be compiled before it can be used by Octave.
> That's why you need the mkoctfile step I mentioned before.
> Cheers, Michael
>
More information about the Help-octave
mailing list