dex-lang
dex-lang copied to clipboard
Finish numerics for Gaussian distributions
- [ ] Find or implement
erfinv
(apparently CUDA has one but LLVM and libm do not) and plug it in forNormalDist
quantile - [ ] Implement the derivatives of
erf
anderfc
so that Gaussian CDF can be differentiated (the formulas are easy) - [ ] Implement a more numerically accurate approximation to the Gaussian CDF, e.g. with Cephes/TFP’s ndtr https://github.com/tensorflow/probability/blob/main/tensorflow_probability/python/internal/special_math.py