Skip to content

Commit

Permalink
Merge pull request #2522 from pymc-devs/notebook_edits
Browse files Browse the repository at this point in the history
Minor improvements to 3 notebooks
  • Loading branch information
fonnesbeck committed Aug 23, 2017
2 parents 1f34a5f + d364ab0 commit 46714e3
Show file tree
Hide file tree
Showing 4 changed files with 223 additions and 373 deletions.
270 changes: 136 additions & 134 deletions docs/source/notebooks/Diagnosing_biased_Inference_with_Divergences.ipynb

Large diffs are not rendered by default.

210 changes: 59 additions & 151 deletions docs/source/notebooks/convolutional_vae_keras_advi.ipynb

Large diffs are not rendered by default.

114 changes: 27 additions & 87 deletions docs/source/notebooks/probabilistic_matrix_factorization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -252,9 +250,7 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -287,9 +283,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -325,9 +319,7 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -366,9 +358,7 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -428,9 +418,7 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -509,9 +497,7 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from collections import OrderedDict\n",
Expand Down Expand Up @@ -635,9 +621,7 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import time\n",
Expand Down Expand Up @@ -723,9 +707,7 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"try:\n",
Expand Down Expand Up @@ -820,9 +802,7 @@
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# Draw MCMC samples.\n",
Expand Down Expand Up @@ -870,9 +850,7 @@
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"def _predict(self, U, V):\n",
Expand Down Expand Up @@ -922,9 +900,7 @@
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# Define our evaluation function.\n",
Expand All @@ -951,9 +927,7 @@
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import hashlib\n",
Expand Down Expand Up @@ -1018,9 +992,7 @@
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"train, test = load_train_test('6bb8d06c69c0666e6da14c094d4320d115f1ffc8')"
Expand All @@ -1036,9 +1008,7 @@
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1070,9 +1040,7 @@
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stderr",
Expand Down Expand Up @@ -1113,9 +1081,7 @@
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stderr",
Expand Down Expand Up @@ -1158,9 +1124,7 @@
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"def eval_map(pmf_model, train, test):\n",
Expand Down Expand Up @@ -1188,9 +1152,7 @@
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1228,7 +1190,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [],
Expand All @@ -1254,9 +1215,7 @@
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"def _norms(pmf_model, monitor=('U', 'V'), ord='fro'):\n",
Expand Down Expand Up @@ -1293,9 +1252,7 @@
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand All @@ -1322,9 +1279,7 @@
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"def _running_rmse(pmf_model, test_data, train_data, burn_in=0, plot=True):\n",
Expand Down Expand Up @@ -1360,9 +1315,7 @@
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand All @@ -1382,9 +1335,7 @@
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -1428,9 +1379,7 @@
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -1500,21 +1449,12 @@
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [default]",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -1528,7 +1468,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.6.1"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/notebooks/sgfs_simple_optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.6.1"
},
"toc": {
"colors": {
Expand Down

0 comments on commit 46714e3

Please sign in to comment.