Skip to content

Week 2 into GSoC

Following up the work done in week 1, I started exploring surrounding packages of PyMC4 i.e. TFP, ArviZ and PyMC3 to gain better insights how things need to be integrated. On the way, I opened a few issues and PRs fixing docstrings.

  • ArviZ Issue #1232 regarding rendering of notebooks.
  • PyMC4 Issue #283 regarding Transformations. I am still wondering whether the transformations are missing or automatically handled.
  • TFP PR #965 that fixes tfb.Chain docstrings.

Work done this week

Figuring out the solutions over the review of the PR #280, I have -

  • Added sample method for sampling from posterior distribution.
  • Fixed return type from fit function to include Approximation as well.
  • Updated variational quickstart notebook incorporating both of the changes above.

It took me a bit longer to look out for good variable names and to make quick-start notebook similar to PyMC3's Variational API notebook. But the time was worth it.

Experiments

Most of the time this week, I spent experimenting on ideas building on top of week 1's work. I polished out my experiments and created two gists.

Gist 1 - Source

Comparison between MeanField ADVI in TFP, PyMC3 and PyMC4. It was fun doing this.

Gist 2 - Source

Experimenting with ArviZ. I started learning from how trace from tfp.mcmc.sample_chain gets converted to ArviZ InferenceData. Following the same, I soon ran into shape issues while integrating it into sample method. I plan to resolve it in week 3.

Tasks for week 3

  • Tests about convergence checks
  • Add convergence criteria example in quick start notebook
  • Include samples for untransformed variables as well
  • Handle shape issues with ArviZ while sampling
  • More user friendly optimizers

I am thankful to my mentor for his constant guidance and pymc-devs for being such a supportive community.

Thank you for reading!

With ❤, Sayam


Last update: June 14, 2020

Comments