Created
July 27, 2016 17:12
-
-
Save karlnapf/5b6d9583f3a4923eba624ecadb731be0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import numpy as np\n", | |
"from scipy.stats import norm\n", | |
"import matplotlib.pyplot as plt\n", | |
"%matplotlib inline" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 102, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"N=10000\n", | |
"X = np.random.randn(N, 1)\n", | |
"a= 15\n", | |
"M = 2.5" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 103, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"[<matplotlib.lines.Line2D at 0x7fd793c67310>]" | |
] | |
}, | |
"execution_count": 103, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEACAYAAACj0I2EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXm8XVV5979PZshEEkiAEECIDEKYkzCIxAIyKtSKgtYW\nywvYgvLKW8Sh9uZUfa3WVq1oBYsoVYsWcECRQSTKIBAwkABhnkIIYwhTBm6Sp3+stW/23XcPa5+z\nzz3Dfb6fTz6555x19ln3Jvd3fue3nvUsUVUMwzCMzmdYqydgGIZhVIMJumEYRpdggm4YhtElmKAb\nhmF0CSbohmEYXYIJumEYRpdQKOgicrGIPCcii3PG/LuIPCwid4vIPtVO0TAMwwghxKFfAhyV9aCI\nHAPsrKpvBc4EvlPR3AzDMIwSFAq6qt4MvJwz5ATgUj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H0X4B0icpuI3CgiB7RgDk1DRN4DLFPVkK3wnc7f\nAL9p9SQaJG3jXNcIXhwR2RG3Vf/21s6kUiLz1K2LgW8BXhSRS3ysdJGIbJY1uCkbi0Tkety25767\ncD/wf/CvOUlVDxSR2bjdaTs1Yx7NouD7+wyxfhgM2JHQ/uR8f59V1av8mM8Cvar64xZM0SiJiIzD\n7RQ9xzv1jkdEjgOeU9W7fZTbcb9rAYwA9gPOUtU7ReTruN3WPVmDK0dVj8x6TEQ+Clzpxy30C4dT\nVHN7TLQVWd+fiOyJ6yF+j4gILo64S0TmqGpRu9i2Ie/fD0BETsV9zP2zQZlQc1mOO5wjoqglbcch\nIiNwYv5fqvqLVs+nQg4B3iMix+JaaYwXkUtVNWSXc6fwNO4Tf9QC+3Igc+G+FZHLz/FCICK7ACM7\nSczzUNV7VXVrVd1JVd+C+8fYt5PEvAgRORr3Efc9qunbwjuMvo1zIjIKt3Gu26olvgfcr6rfaPVE\nqkRVP6Oq26vqTrh/t991mZjjN2gu81oJrmle5gJwK3q5XAJ8T0SWAOsI6xnSqSjd9zHwm7g+H9e7\nDyHcpqp/19op1U/WxrkWT6syROQQXN+XJSKyCPd/8jOqek1rZ2aU4OPAj0RkJO7cgcyNm7axyDAM\no0uwI+gMwzC6BBN0wzCMLsEE3TAMo0swQTcMw+gSTNANwzC6BBN0wzCMLsEE3TAMo0swQTcMw+gS\n/hcbvNDECxA3qgAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x7fd794077750>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"Xs = np.linspace(-5,5, 500)\n", | |
"Mp = M*norm.pdf(Xs)\n", | |
"q = norm.pdf(Xs)*(1+np.sin(a*Xs))\n", | |
"plt.plot(Xs, Mp)\n", | |
"plt.plot(Xs, q)\n", | |
"\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 104, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"0.452624664733\n" | |
] | |
} | |
], | |
"source": [ | |
"# rejection sample q(x)=p(x)*(1+sin(a*x)) using p(x) from above as proposal\n", | |
"# need p(x)< Mq(x) for M> 1\n", | |
"\n", | |
"\n", | |
"Ys = []\n", | |
"i=0\n", | |
"accepted=0.\n", | |
"rejected=0.\n", | |
"while i<N:\n", | |
" y = np.random.randn()\n", | |
" p_y = norm.pdf(y)\n", | |
" q_y = norm.pdf(y)*(1+np.sin(a*y))\n", | |
" ratio = p_y / (M*q_y)\n", | |
" u = np.random.rand()\n", | |
" if u<ratio:\n", | |
" Ys.append(y)\n", | |
" i+=1\n", | |
" else:\n", | |
" rejected+=1\n", | |
"print rejected/(rejected+N)\n", | |
"Ys = np.array(Ys)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 106, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFHRJREFUeJzt3W2MXNd93/Hvj1b1kAcLSlwtA1GuZShRJLeJZaR0A6Eo\n49SK5QCUWhSCgqC1ogQpqgQ2kMIVqRglGwSx5RdJjbZ60doRWMOGwCRoJbduRSnEBsgLW0ktObLJ\nMCwCKTRhrprGSKDGEvTw74u5Iw53l9y7uzN7Z89+P8BCd+7eM/Pf1eyPZ845995UFZKktuwaugBJ\n0vQZ7pLUIMNdkhpkuEtSgwx3SWqQ4S5JDeoV7kmuTvJbSU4m+XqS9ya5JsmxJKeSPJHk6onjDyY5\n3R1/++zKlyStpm/P/VPAF6vqZuCHgT8GDgBPVdVNwHHgIECSW4C7gZuBO4CHk2TahUuSLm7NcE/y\nVuDvV9UjAFX1WlX9JXAncKQ77AhwV7e9H3i0O+554DSwd9qFS5Iur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9KcjlwD7DmCoctEIafj1juN4ETVfWpoQsBSPK28RBxkqsYfZIf9G+u\nqh6sqrdX1TsZvZeOXyrYYfg7MX0yybuBN4DngX8+bDkrFPPxh/CJJD8AvA78KfAvBq5n7N8BlwNP\ndtdZ+1JV3T9kQUnu6up6G/DfkjxbVXdsdR3zeCJfks8zusrh93bzN4eq6pGBa7oN+GnguW6Mu4AH\nB145933Ake7T+y5Gnyh+d8B6NsSTmCSpQfOwWkaSNGWGuyQ1yHCXpAYZ7pLUIMNdkhpkuEtSgwx3\nSWqQ4S5JDfr/p8Z+mutQMTQAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<matplotlib.figure.Figure at 0x7fd793c4df50>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"plt.hist(Ys, bins=100);" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 2", | |
"language": "python", | |
"name": "python2" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 2 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython2", | |
"version": "2.7.6" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment