astrodeepnet / sbi_experiments

Simulation Based Inference experiments
MIT License
3 stars 3 forks source link

Implement ML tasks #21

Open Justinezgh opened 2 years ago

Justinezgh commented 2 years ago

Tasks (from https://arxiv.org/pdf/2101.04653.pdf):

image

image

image

image

Justinezgh commented 2 years ago

notebook : here

Justinezgh commented 2 years ago

For the 2 moons, should I use dist.TransformedDistribution(distribution, transform) from numpyro to get the simulation x ?

EiffL commented 2 years ago

Hum you don't necessarily need to use numpyro for anything here. You can do everything in tfp

Justinezgh commented 2 years ago

I'm not sure to understand, can we get p(theta|x,z) with tfp ?

EiffL commented 2 years ago

Hummmm I'm not sure I understand either ^^ numpyro doesn't give you p(theta|x,z) either?

Justinezgh commented 2 years ago

ok I'm lost ^^

Justinezgh commented 2 years ago

Lokta-Volterra: notebook

I still have a pb with vmap() or Independent() because when I increase the time or the batch_size the score increases too. But observations seems ok image

EiffL commented 2 years ago

Cool cool cool :-D

Justinezgh commented 2 years ago
image

from: https://arxiv.org/abs/1905.07488

Justinezgh commented 2 years ago

I learned Lokta Volterra posterior with 2 different compressors: one trained with MSE and one with VMIM.

EiffL commented 2 years ago

That's awesome! Very nice! So the regression compression doesn't get any better than that no matter what you do?

EiffL commented 2 years ago

I'll just ping @dlanzieri about this because this is exactly the sort of thing we are interested in regarding this compression question

Justinezgh commented 2 years ago

you can probably do better ^^ but the regression seems not that bad: (orange points are jnp.abs(reg[:,j]-p[:,j])>0.05 with p the parameters and reg the prediction) image image image image