Closed GoogleCodeExporter closed 9 years ago
In the screenshot t is way too large (48000) so exp(c1 * t) overflows. The
issue is that the initial t needs to be specified so that it is greater than
the root time but only a little bit. Perhaps the initial value needs to be set
as rootHeight + delta?
Original comment by ramb...@gmail.com
on 2 Feb 2012 at 7:40
This is very tricky part:
origin (t here) = avgInitialRootHeight * 1.1, which is not big increase during
auto-rescaling.
But the problem is that avgInitialRootHeight = options.maximumTipHeight * 10.0;
from BEAUti estimation in "case TIP_CALIBRATED" of
ClockModelOptions.calculateInitialRootHeightAndRate(partitions).
We spent a lot of time on this, but never getting any good estimation of init
root height for all cases.
Would you have any simple solution?
Original comment by dong.w.xie@gmail.com
on 3 Feb 2012 at 4:05
The problem is the entire scale of the numbers. If the c1 * t > 700 then it
will over flow. The solution may be to scale t down by using a larger time
unit?
Original comment by ramb...@gmail.com
on 3 Feb 2012 at 7:07
just checked the critical equation:
res = 2.0 * (1.0 - c2 * c2) + Math.exp(-c1 * t) * (1.0 - c2) * (1.0 - c2) +
Math.exp(c1 * t) * (1.0 + c2) * (1.0 + c2);
So, it is correct. However we could rewrite it:
res = Math.exp(c1 * t) * ( Math.exp(-c1 * t) * (1.0 - c2) + (1.0 + c2) ) * (
Math.exp(-c1 * t) * (1.0 - c2) + (1.0 + c2) );
meaning if we operate directly in logspace:
res = c1*t+2* Log ( Math.exp(-c1 * t) * (1.0 - c2) + * (1.0 + c2) );
so we avoid any Math.exp(c1*t) !
Original comment by tanja...@googlemail.com
on 3 Feb 2012 at 3:40
sorry last row is a typo, correct is:
res = c1*t+2* Log ( Math.exp(-c1 * t) * (1.0 - c2) + (1.0 + c2) );
Original comment by tanja...@googlemail.com
on 3 Feb 2012 at 3:41
Original comment by dong.w.xie@gmail.com
on 6 Feb 2012 at 10:20
Original issue reported on code.google.com by
dong.w.xie@gmail.com
on 1 Feb 2012 at 10:31Attachments: