help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

## Re: [Help-gsl] Re: Re: non-linear least squares fitting

 From: Barrett C. Foat Subject: Re: [Help-gsl] Re: Re: non-linear least squares fitting Date: Mon, 10 Dec 2007 13:09:57 -0600 User-agent: KMail/1.9.3

I answered this question previously:
http://lists.gnu.org/archive/html/help-gsl/2007-09/msg00021.html

If your gradient does not smoothly slope away from the bounds, the package
will likely throw an error and fail to converge.

Barrett

On Friday 07 December 2007 14:03, Jay Howard wrote:
> Side question:
>
> What's the best way to enforce boundaries on the parameters being
> fitted?  Just have f() and df() return huge values whenever one of
> them falls outside its acceptable range?
>
> For instance, if I wanted to minimize F(x,y) over the range:  a <= x
> <= b, c <= y <= d.
>
> On Dec 6, 2007 8:25 AM, Barrett C. Foat <address@hidden> wrote:
> > I guess that I misunderstood. I have always used analytical partial
> > derivatives. I am kind of surprised that numerical partial derivatives
> > work. However, if the optimization converges without errors, it must
> > be a good enough approximation for your function. In my experience,
> > this package fails to converge if you do something wrong with the
> > derivatives.
> >
> > Barrett Foat
> >
> > On Thursday 06 December 2007 03:21, Richard Henwood wrote:
> > > <posted & mailed>
> > >
> > > Barrett Foat wrote:
> > > >> I implement fdf using numerical partial differentiation of f.
> > > >>
> > > >> This method (numerical partial differentials) appeared to work;
> > > >> is this a reasonable approach?
> > > >
> > > > Yes, the df and fdf functions need to caluclate the numerical
> > > > partial derivatives given the current values of the arguments
> > > > (vector x in the docs) and your independent variable data.
> > > >
> > > > To my knowledge, the approach you took is the only reasonable
> > > > approach.
> > >
> > > Good.
> > >
> > > Is the only alternative approach to use the analytic partial
> > > derivatives in df and fdf?
> > >
> > > My reading is that this approach is used in the example given in the
> > > GSL manual example.
> > >
> > > r,
> > >
> > >
> > >
> > > _______________________________________________
> > > Help-gsl mailing list
> > > address@hidden
> > > http://lists.gnu.org/mailman/listinfo/help-gsl
> >
> > _______________________________________________
> > Help-gsl mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/help-gsl
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl

reply via email to

 [Prev in Thread] Current Thread [Next in Thread]