Author Archives: oxinabox.github.io

Estimating Estrogen

By: oxinabox.github.io

Re-posted from: https://www.oxinabox.net/2022/11/11/Estimating-Estrogen.html

As a trans-femme on HRT, I would like to know the concentrations of estradiol in my blood at all hours of day.
This is useful as the peak, the trough and average all have effects.
However, I only get blood tests a finite number of times per day – usually once.
I am not a medical doctor, but I am the kind of doctor who can apply scientific modelling to the task of estimating curves based on limited observations.
I am honestly surprised no one has done this.
The intersection of trans folk and scientific computing is non-trivial.
After all, the hardest problem in computer science is gender dysphoria.

To do this we are going to use probabilistic programming, to get a distribution of possible level curves.
This is a great use-case for probabilistic programming.
We have a ton of domain knowledge, but that domain knowledge has a few parameters we don’t know, and we have only a little data.
And crucially we are perfectly fine with getting a distribution of answers out, rather than a single answer.

Continue reading

Automatic Differentiation Does Incur Truncation Errors (kinda)

By: oxinabox.github.io

Re-posted from: https://www.oxinabox.net/2021/02/08/AD-truncation-error.html

Griewank and Walther’s 0th Rule of algorithmic differentiation (AD) states:

Algorithmic differentiation does not incur truncation error.

(2008, “Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation”, Andreas Griewank and Andrea Walther.)

In this blog post I will show you a case that looks like it does in fact incur truncation error.
Though this case will arguably be a misinterpretation of that rule.
This blog post will thus highlight why careful interpretation of the rule is necessary.
Further it will motivate why we need to often add more custom sensitivity rules (custom primitives) to our AD systems, even though you can AD anything with just a few basic rules.

Credit to Mike Innes who pointed this out to me at JuliaCon 2018.
Continue reading