treetime icon indicating copy to clipboard operation
treetime copied to clipboard

Reproducible Analysis

Open ktmeaton opened this issue 3 years ago • 2 comments

Is there a way to make analyses reproducible, perhaps by setting a random seed? Specifically, I'm using the run function of the TreeTime class to estimate a clock model.

I've tried:

random.seed(1234)

and

numpy.random.seed(1234)

but the results still change slightly each time.

Thanks!

ktmeaton avatar Apr 06 '21 13:04 ktmeaton

Hmm. There are very few places where some stochastic behavior is expected (like placing mutations on the children of the root). Some variation might also come from rounding behavior, but on the same machine I'd expect these to be the same on every run. I am not sure whether any underlying optimization routine might use their own RNG.

rneher avatar Apr 11 '21 19:04 rneher

Thanks for your reply! The variation I notice has been node dates (both joint and marginal). I'll play around with the parameters and see if I figure out anything more.

ktmeaton avatar Apr 13 '21 14:04 ktmeaton