pymc icon indicating copy to clipboard operation
pymc copied to clipboard

Disable sampling of transformed variables from `prior_predictive`

Open ricardoV94 opened this issue 3 years ago • 5 comments

This was added to facilitate sampling from the prior as a starting point for SMC, but with the new functions added in #4983 this is no longer needed.

https://github.com/pymc-devs/pymc/blob/6d2aa5ddebed01d81c2ab66b9d4bd02194f82508/pymc3/sampling.py#L1983-L1999

ricardoV94 avatar Oct 14 '21 08:10 ricardoV94

I'd like to take up this issue.

markvrma avatar Dec 31 '21 12:12 markvrma

Is it okay if I work on this?

purna135 avatar Mar 02 '22 10:03 purna135

Is it okay if I work on this?

Sure

ricardoV94 avatar Mar 18 '22 08:03 ricardoV94

I need some assistance in replacing the following code with make_initial_point_fn https://github.com/pymc-devs/pymc/blob/e6fc2ec100dafacca4f0b9eab40661174707afcd/pymc/smc/smc.py#L179-L184

https://github.com/pymc-devs/pymc/blob/d84c71884762fb925eb7272b9d28e879399e326a/pymc/initial_point.py#L130

purna135 avatar Mar 19 '22 08:03 purna135

You will have to change the parameters of make_initial_point_fn so that it is returning draws from the transformed prior. You can do that by setting the overrides dictionary so that every value variable strategy is "prior", and also switching the default from "moment" to "prior". Then you will need to make sure you call the returned function with a different seed self.draws times.

ricardoV94 avatar Mar 22 '22 09:03 ricardoV94