IvanYashchuk / fenics_pymccon2020

PyMCon 2020 Tutorial on using FEniCS with PyMC3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Including partial differential equations in your PyMC3 model

Ivan Yashchuk

PyMCon 2020 Tutorial on using FEniCS with PyMC3

This tutorial intoduces the use of FEniCS for solving differentiable variational problems in PyMC3.

Automatic adjoint solvers for FEniCS programs are generated with dolfin-adjoint/pyadjoint. These solvers make it possible to use Theano's (PyMC3 backend) reverse mode automatic differentiation with FEniCS.

Here is the link to the static (non-interactive) version of the tutorial: https://ivanyashchuk.github.io/fenics_pymccon2020/

Binder

Setup

This tutorial assumes that you have Anaconda (Python 3.7 version) setup and installed on your system.

The next step is to clone or download the tutorial materials in this repository. If you are familiar with Git, run the clone command:

git clone https://github.com/IvanYashchuk/fenics_pymccon2020.git

otherwise you can download a zip file of its contents, and unzip it on your computer.

The repository for this tutorial contains a file called environment.yml that includes a list of all the packages used for the tutorial. If you run:

conda env create -f environment.yml

from the main tutorial directory, it will create the environment for you and install all of the packages listed. This environment can be enabled using:

conda activate fenics_pymc3_tutorial

Then, I recommend using JupyterLab to access the materials (tutorial.ipynb):

jupyter lab

About

PyMCon 2020 Tutorial on using FEniCS with PyMC3


Languages

Language:Jupyter Notebook 69.7%Language:Python 17.4%Language:CSS 12.3%Language:Shell 0.5%