Scope of implementing ABC,SMC-ABC in PYMC4 as GSOC 2019 Project

It’s Adarsh , I have been experimenting some simple models on pymc3 (shared here exp ) and had some discussion with @junpenglao @aloctavodia . I am willing to contribute regarding adding the ABC, SMC-ABC support in pymc4 ,@twiecki it would be great to hear about the Scope/Possibility of the project.

Hi @Adarsh-kumar,

This could be an interesting project for GSo2019. But at this point we are at an early stage of the process. Thus, I suggest you follow this recommendations.

But the topic Help in creating the upcoming PyMC4 based on Tensorflow Probability is quite broad , some suggestions to get started would be great.@aloctavodia @junpenglao

Yes the topic is indeed quite broad. I would say the overall project would be:

  1. implement a framework for prior predictive sampling
    Currently we have a forward sample context in place in the model that generate a tensor out function for prior sampling, we need testing and example to make sure that this is working as intended. (You can start from here)
  2. Distance function in TF for ABC
  3. Some SMC-ABC sampling routine, in tensorflow.
    The main challenge here would be the weighting of particles and resampling, as they need to be done in TF/TFP
  4. further optimization.

Again, I think this would be a very exciting project and potentially works even better than the current SMC in pymc3, as the random sampling in TF and TFP should be much faster and more robust.

Thanks for the suggestions , I am surely going to start contributing on the part you mentioned as point 1.

Hello @junpenglao ,I have tested the forward sampling example from the pymc4 examples file, As far as I know forward sampling is done to draw samples Forward sampling proceeds in topological order we always generate values for the parents of a variable before generating a value for the variable( please correct me if i’m wrong. )
It would be great if you elaborate the point -implement a framework for prior predictive sampling in details like what are the further requirements that are to be implemented in the pymc4 for prior predictive sampling.

Yes, and samples from a tensorflow probability distribution is in graph meaning that in one…) call all samples would have the right dependency (ie, you don’t need to feed the parent value to children manually like currently in pymc3). The challenge is then to make sure the program generated forward sampling function by pymc4 output the right (dependent) draws. And efficient in batch drawing (ie no need of forloop)

Thanks for the response and clarification regarding forward sampling. I will update you about the output of forward sampling in pymc4 soon.
Meanwhile I wanted to ask you for help regarding writing a proposal for Gsoc’19 ,I am open to contribute to this project as well as the projects - Dirichlet process and Random variable reimplementation and symbolic computation.

That would be too big of a scope for your GSOC project - it would be better to focus on one topic (e.g., just SMC-ABC)

Yes ,but I asked the same before but was told to follow these projects,As the topic of this thread was about SMC-ABC I will be very happy to extend SMC-ABC in pymc4 for GSOC’19 or any subtopic you suggest. @junpenglao @aloctavodia

SMC-ABC in pymc4 is a great project for GSoC2019. Even if it is not explicitly listed in the wiki. As @junpenglao already suggested implementing a framework for prior predictive sampling is a very good starting point.