Alter the constraint of an aliased parameter

20 views
Skip to first unread message

Keren Halabi

unread,
Dec 24, 2018, 7:26:30 AM12/24/18
to Bio++ Usage Help Forum
Dear Bio++ team,

I wish to apply an "on-the-flay" boundaries adjustment procedure for parameters of my model: in each iteration of the optimization call, I check if a parameter has reached a value that lies it is lower of upper bound, and if yes, I relax its boundaries.
I know how to change the boundaries of a parameter, and by applying the suggested procedure via updateMatrices() I can assure that the adjustment occurs whenever needed. 
The problem: some of my parameters are aliased, and since the updating of boundaries occurs via updateMatrices(), which belongs to a sub-model in my modelSet where the aliasing occurs, the boundary of the aliased parameter to the one whose boundary I changed is not being updated. I don't have access to the aliased parameter via updateMatrices(), which belongs only to the sub-model, and not to the modelSet, so I can update its boundary as well.

Is there any way I could bypass this issue without surgically adding a repeated all to aliasPatameters() to the optimization procedure?

Many thanks!
Keren

Keren Halabi

unread,
Dec 25, 2018, 8:28:10 AM12/25/18
to Bio++ Usage Help Forum
Dear Bio++ team,

Following this post, I could alternatively implement an iterative optimization procedure from my main function, in which I repeatedly call the optimizer, and then adjust the boundaries for the next call. when adjusting the boundaries via such procedure, I can access all the sub-models at once. The question is: Can I edit the constraints of linked parameters independently, without damaging their linkage (i.e, aliasing)?

Many thanks!
Keren

Laurent Guéguen

unread,
Jan 8, 2019, 5:19:54 AM1/8/19
to Bio++ Usage Help Forum
Hi Keren,

it is strange to enlarge constraint boundaries on the fly: they are usually set to avoid computational issues, and
so are defined hard. Changing boundaries is usually done before optimization to reduce limits for modelling reasons.


But actually setConstraint is not transmitted to aliased parameters. I fix this (and meantime set constraints as shared_ptr in Parameters).
I tell you when it is done.

Cheers,
Laurent

Laurent Guéguen

unread,
Jan 8, 2019, 4:16:22 PM1/8/19
to Bio++ Usage Help Forum
Hi again,

it is done, on devel branches. I let you check it works fine.

Cheers,
Laurent

Keren Halabi

unread,
Jun 14, 2019, 12:16:09 PM6/14/19
to Bio++ Usage Help Forum
Dear Laurent,

Thank you for this feature. Should I compile it with the devel branches of the bpp-core and bpp-seq library? I am experiencing some compilation errors.

Many thanks again!
Keren

Laurent Guéguen

unread,
Jun 18, 2019, 9:45:42 AM6/18/19
to Bio++ Usage Help Forum
Dear Keren,

you should go on with devel branches now.

Cheers,
laurent

Reply all
Reply to author
Forward
0 new messages