I’m having trouble connecting the dots between the weather example in Intro Part 1 and the weight example in Intro Part 2. I believe I understand the general topics covered in each, but I am getting lost in implementation.
At the end of the weather example in Intro Part 1, it says:
We’ve shown how we can use stochastic functions and primitive distributions to represent models in Pyro. In order to learn models from data and reason about them we need to be able to do inference. This is the subject of the next tutorial.
My understanding is in the weight example, it uses SVI to answer “what would we have guessed, if we observed the measurement of the object was 9.5”.
I was interested in using that same inference methodology, but apply it to the weather example in Part 1. Specifically, it would answer something like: "what would the be the probability of cloudy, given we observed the temperature was 55 degrees".
The weather example in Part 1 has a data generating function, weather(), that incorporates a Bernoulli variable (cloudy) and a Normal variable (temperature).
The weight example in Part 2 has a function, scale(), that incorporates all Normals.
I wasn’t sure how to use Pyro to formulate the model, and apply inference, when there is a mixed Bernoulli-Normal.
Would anyone be able to hint at how to apply Part 2’s methodology to Part 1 (conditioning function, guide function, etc)?