{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# PDE-based BIP using CUQIpy and CUQIpy-FEniCS plugin\n", "\n", "\n", "\n", "Here we build a Bayesian inverse problem to infer the conductivity in a 2D unit-square domain modelled by the Poisson equation (applications include EIT problems).\n", "\n", "The PDE model is built using FEniCS, then we use CUQIpy-FEniCS to wrap the PDE model to interface it with CUQIpy. We use CUQIpy samplers to solve the PDE-based Bayesian problem.\n", "\n", "## Learning objectives of this notebook:\n", "- Build a FEniCS-based Poisson problem\n", "- Build and solve the corresponding PDE-based Bayesian problem in CUQIpy\n", "\t- Use Matern covariance to specify the prior\n", "\t- Use pCN sampler\n", "- Use gradient-based sampler\n", "\t- Identify the chain rule needed to compute the gradient of the log-likelihood\n", "\t- Use NUTS sampler\n", "\n", "## Table of contents\n", "1. [Building a FEniCS based Poisson problem](#PDEproblem)\n", "2. [Building and solving the PDE-based Bayesian problem in CUQIpy](#Bayesian_problem)\n", "3. [Using gradient-based sampler](#gradient_sampling)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
cuqi.experimental.mcmc
module, which are expected to become the default soon. Check out the documentation for more details.\n",
"