CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.72k stars 7.88k forks source link

Chapter 3 | use of tfd.Independend | TFP version #435

Open Pindar777 opened 5 years ago

Pindar777 commented 5 years ago

Hi @matthew-mcateer,

could you please elaborate on the indtroduction of these lines in Chapter 3?

sds = tfd.Independent(tfd.Uniform(low=[0., 0.], high=[100., 100.]), reinterpreted_batch_ndims=1, name='sds')

At the moment the texts says

we will initially model them as uniform on 0 to 100. We will include both standard deviations in our model using a single line of TFP code

Later on in Chapter 3 the two prio distributions for the sigmas are just modeled 'plain vanilla' with

rv_sds = tfd.Uniform(name="rv_sds", low=[0., 0.], high=[100., 100.])

More over the 'variable sds' does not show up anymore in Chapter 3.

So, why is the Independent distribution from batch of distributions introduced at all and which gains would be realized if used?

bluesky314 commented 5 years ago

Did you figure this out? Can you share your email so we could discuss about TF Probability?