maho3 / ltu-ili

Robust ML in Astro
https://ltu-ili.readthedocs.io/en/latest/
43 stars 8 forks source link

Make custom ili.utils.distributions #111

Closed maho3 closed 9 months ago

maho3 commented 9 months ago

It's quite a pain to configure standard torch.distributions in yaml files, as they often require matrix-like arguments. For example torch.distributions.Normal takes vector-like loc and scale arguments, but then its log_pdf function returns a scalar as well.

We need to make a custom ili.utils.distributions module which wraps the distributions in torch.distributions and pydelfi.priors to make them more amenable for yaml-like configuration. Then, we can point to these objects as our prior functionality, and also provide guidance for people to make custom ones down the line.