The general route is to wrap the external model in theano, and implement a grad method for it as well.
  
  
    I am using PyMC3 for parameter estimation using a particular likelihood function which has to be defined. Here L is the analytic form of my Likelihood function. I have some observational data for the radial velocity(vr) and postion ® for some objects, which is imported from excel file. My priors are M and beta which is assumed to be a uniform distribution.I want to incorporate an integral integ(gamma, beta)into my likelihood function that actually is a function of one of my parameter. I tried us…
   
 
And here is two more examples from @aseyboldt :
  
  
    
  exoplanet.ipynb 
  {
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [show original 
   
  
    
    
  
  
 
  
  
    
  pde.ipynb 
  {
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "WIP\n",
    "\n",
    "This is an experiment about how to use fenics and PyMC3 to\n",
    "sample from the posterior of a bayesian model involving\n",show original 
   
  
    
    
  
  
 
@aseyboldt  is currently writing a blog post on the later one, but I think you should have enough information to give it a go