Hamlitonian Sampling for Balmer Lines
Opened this issue · 1 comments
dgahle commented
Update BaySAR to be compatible with inference.mcmc.HamiltonianChain
to resolve the effective sample size in demo/balmer_series.py` flatlining at about 7.
Useful links:
- SymPy - https://python.plainenglish.io/how-is-symbolic-differentiation-done-in-python-using-sympy-6484554f25b0
- My maths notes - https://www.overleaf.com/project/64fc839f4d91b9553e1f581b
Task list
- Write out the mathematics
- Plan out the objects that require a
gradient
class method - Update this list with the above and cross out as going along
- Add unit tests to verify functionality
- Update
demo/balmer_series.py
with theHamiltonianChain
dgahle commented
It's likely that each function that needs to be differentiated will need to be a class that can store all the dependent/nested function gradient methods can be accessed for.
Or cache the gradients of some of the lowest level functions like emission, temperature, and density profiles.