Closed erwald closed 1 year ago
Seems totally reasonable to put this in utils
. There are a bunch of other things there. I think being a general BOTEC/modeling framework sounds good to me.
Want to implement this?
Yeah sure, I should get a PR up later this week.
Now and again I find myself wanting to convert from doubling time to growth rate and back. I normally Rule of 72 this, but that gets inaccurate starting around growth rates ≥15%.
The formula for calculating this properly is simple but kinda annoying to remember and write repeatedly:
More problematically, I can't plug squigglepy distributions into these functions, since
math.log
/math.exp
(andnp.log
/np.exp
) don't work on distributions.Tbh I'm not sure if this is a good fit for squigglpy as it has little to do with probabilities etc. (It's a better fit if you see squigglepy more as a general BOTEC/modelling framework.) But figured I'd raise it and let you decide.