Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
optimise starting points & ClearConstraints (Read 1969 times)
wayne
Global Moderator
*****
Offline


I love YaBB 1G - SP1!

Posts: 57
San Diego, CA
Gender: male
optimise starting points & ClearConstraints
Apr 23rd, 2008 at 9:53am
 
Hi Sergei, hope all is well. just have 2 quick ?

1. i've noticed i don't get any gain in speed when starting the optimisation of an alternate (unconstrained) model at the optimised parameter values for the null model. i would've expected this? is this perhaps unique to my problem, or is the optimise function hard-coded to do at least x cycles?

2. does ClearConstraints work with variables? i've seen it work with cat vars, but can't seem to get it to work with standard variables.
eg:

global c = Random(0,1);
c :< 1;
ClearConstraints(c);

does not remove the constraint c:<1?

thanks. ./w
Back to top
 

Assistant Project Scientist&&Antiviral Research Center&&Department of Pathology&&University of California, San Diego
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: optimise starting points & ClearConstraints
Reply #1 - Apr 23rd, 2008 at 1:51pm
 
Hi Wayne,

Glad to have you back.

1). Did you set the USE_LAST_RESULTS variable to 1 after the null model has finished optimizing? By default, HyPhy will always apply some heuristics to guess initial parameter values, but with the flag set it will reuse the current values.

2). ClearConstraints will remove := constrains but not :< or :> (range) constraints. Currently you have to remove range constraints by hand (by resetting them to other values).

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged
 
wayne
Global Moderator
*****
Offline


I love YaBB 1G - SP1!

Posts: 57
San Diego, CA
Gender: male
Re: optimise starting points & ClearConstraints
Reply #2 - Apr 23rd, 2008 at 2:04pm
 
thanks.

1. i did this manually, storing parameter estimates and then setting starting values to those stored in array. ie.

global c = somearray [ i ]; 

does hyphy still guess in this case. should i rather set USE_LAST_RESULTS=1? this probably won't work since null and alt are being optimised on different nodes and thus there are no last results per se?

2. mmm. so i had

global c:<1;

to constrain less than 1. i reset manually with

global c:<1000;

thus allowing an upper limit which includes values > 1. however i get some strange optimisations where the parameter estimates are exactly 1000. almost as if there is a fatal attraction to the upper limit? i seem to have solved this by changing the parameter names to c and c_alt for the two models, thus removing the need to remove constraints. although it makes the code a little less elegant. Sad cheers ./w
Back to top
 

Assistant Project Scientist&&Antiviral Research Center&&Department of Pathology&&University of California, San Diego
WWW WWW  
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: optimise starting points & ClearConstraints
Reply #3 - Apr 23rd, 2008 at 2:50pm
 
Dear Wayne,

1. That will work; the last value set to each variable will be used (even if you did it manually).
2. Not sure about the attraction to 1000, resetting to c:<1000 should have the desired effect.

Cheers,
Sergei
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged