[ADMB Users] Are parameters scaled for optimization.
Mark Maunder
mmaunder at iattc.org
Wed Jan 1 13:43:55 PST 2014
Thanks Dave. What if it is unbounded? I assume it is the same for standard parameters and re parameters.
Regards,
Mark
IATTC
> On Dec 31, 2013, at 1:03 PM, "dave fournier" <davef at otter-rsch.com> wrote:
>
>
> For a random effects model
> The relevant code appears to be
>
> if the scalefactor has not been set (i.e. =0)
>
> 409 df1b2variable boundp(const df1b2variable& x, double fmin, double fmax,
> 410 const df1b2variable& _fpen)
> 411 {
> 412 ADUNCONST(df1b2variable,fpen)
> 413 df1b2variable t;
> 414 //df1b2variable y;
> 415 //y=x;
> 416 double diff=fmax-fmin;
> 417 const double l4=log(4.0);
> 418 df1b2variable ss=0.49999999999999999*sin(x*1.57079632679489661)+0.50;
> 419 t=fmin + diff*ss;
> 420
>
> So the parameter is effectively scaled by diff.
> Better would be
>
> 418 df1b2variable ss=0.49999999999999999*sin(x/diff*1.57079632679489661)+0.50;
>
> The only difficulty would be that the function minimizer report does not deal with large numbers well.
>
> For parameters whose scalefactor has been set the code is
>
>
> 460 df1b2variable boundp(const df1b2variable& _x, double fmin, double fmax,
> 461 const df1b2variable& _fpen,double s)
> 462 {
> 463 ADUNCONST(df1b2variable,fpen)
> 464 df1b2variable t;
> 465 df1b2variable x=_x/s;
> 466 //df1b2variable y;
> 467 //y=x;
> 468 double diff=fmax-fmin;
> 469 const double l4=log(4.0);
> 470
> 471 // ss is underlying varialbe on [0,1] and t lives in [fmin,fmax]
> 472 df1b2variable ss=0.49999999999999999*sin(x*1.57079632679489661)+0.50;
> 473 t=fmin + diff*ss;
> 474
>
> again
>
> 472 df1b2variable ss=0.49999999999999999*sin(x/diff*1.57079632679489661)+0.50;
>
> would be better.
>
> I wrote a note about this earlier, but it did not generate much interest.
>
>
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at admb-project.org
> http://lists.admb-project.org/mailman/listinfo/users
More information about the Users
mailing list