jangevaare / Pathogen.jl

Simulation, visualization, and inference of individual level infectious disease models with Julia
MIT License
72 stars 10 forks source link

Use with Turing.jl #26

Open mohamed82008 opened 4 years ago

mohamed82008 commented 4 years ago

Hi,

Thanks for the great package! I wonder how much work would be required to connect the simulator here to https://github.com/TuringLang/Turing.jl. Perhaps the Turing team can help with this effort too. Looking forward to hearing from you.

Regards, Mohamed

jangevaare commented 4 years ago

Hello! Thanks for the interest. I'm quite excited by all the probabilistic programming work going on in Julia now. I know of Turing but haven't tried it or explored it deeply. Are there any Turing examples incorporating imputation using data augmentation?

mohamed82008 commented 4 years ago

In Turing, if an input is a vector, the elements with value missing will be treated as random variables and sampled from their distributions during sampling. See https://turing.ml/dev/docs/using-turing/guide#treating-observations-as-random-variables for an example.

trappmartin commented 4 years ago

In Turing you can define the latent variable model your are interested in, including the LVs used in imputation with data augmentation techniques. The inference algorithms will then take care of sampling with respect to their unnormalised posterior. Alternatively, we have a work in progress PR that allows you to define the conditionals by hand.

jangevaare commented 4 years ago

Thanks, I'll take a look.