Permalink
Browse files

Modified argument to parse_dates in Profiling and Getting Started not…

…ebooks
  • Loading branch information...
Chris Chris
Chris authored and Chris committed Dec 5, 2018
1 parent b866355 commit 075c896ce59abdc0eaf8b1329475a4875403b8d4
Showing with 181 additions and 179 deletions.
  1. +1 −0 RELEASE-NOTES.md
  2. +45 −44 docs/source/notebooks/getting_started.ipynb
  3. +135 −135 docs/source/notebooks/profiling.ipynb
@@ -28,6 +28,7 @@
- Refactor SMC and properly compute marginal likelihood (#3124)
- Removed use of deprecated `ymin` keyword in matplotlib's `Axes.set_ylim` (#3279)
- Fix for #3210. Now `distribution.draw_values(params)`, will draw the `params` values from their joint probability distribution and not from combinations of their marginals (Refer to PR #3273).
- Removed dependence on pandas-datareader for examples using Yahoo Finance data (#3262)
### Deprecations
@@ -39,10 +39,10 @@
"pip install pymc3\n",
"```\n",
"\n",
"Or via conda-forge:\n",
"Or via conda:\n",
"\n",
"```\n",
"conda install -c conda-forge pymc3\n",
"conda install pymc3\n",
"```\n",
"\n",
"The current development branch of PyMC3 can be installed from GitHub, also using pip:\n",
@@ -83,7 +83,7 @@
},
{
"cell_type": "code",
"execution_count": 124,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
@@ -118,7 +118,7 @@
},
{
"cell_type": "code",
"execution_count": 125,
"execution_count": 6,
"metadata": {},
"outputs": [
{
@@ -156,7 +156,7 @@
},
{
"cell_type": "code",
"execution_count": 126,
"execution_count": 7,
"metadata": {},
"outputs": [
{
@@ -181,7 +181,7 @@
},
{
"cell_type": "code",
"execution_count": 127,
"execution_count": 8,
"metadata": {
"scrolled": true
},
@@ -240,7 +240,7 @@
},
{
"cell_type": "code",
"execution_count": 128,
"execution_count": 9,
"metadata": {
"scrolled": false
},
@@ -456,16 +456,15 @@
},
{
"cell_type": "code",
"execution_count": 129,
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/ckrapu/miniconda3/envs/pymc3-dev/lib/python3.7/site-packages/pymc3-3.5-py3.7.egg/pymc3/tuning/starting.py:61: UserWarning: find_MAP should not be used to initialize the NUTS sampler, simply call pymc3.sample() and it will automatically initialize NUTS in a better way.\n",
" warnings.warn('find_MAP should not be used to initialize the NUTS sampler, simply call pymc3.sample() and it will automatically initialize NUTS in a better way.')\n",
"logp = -149.58, ||grad|| = 12.242: 100%|██████████| 19/19 [00:00<00:00, 672.09it/s] \n"
"logp = -149.58, ||grad|| = 12.242: 100%|██████████| 19/19 [00:00<00:00, 651.28it/s] \n"
]
},
{
@@ -477,7 +476,7 @@
" 'sigma': array(0.96298858)}"
]
},
"execution_count": 129,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -497,16 +496,18 @@
},
{
"cell_type": "code",
"execution_count": 130,
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/ckrapu/miniconda3/envs/pymc3-dev/lib/python3.7/site-packages/pymc3-3.5-py3.7.egg/pymc3/tuning/starting.py:61: UserWarning: find_MAP should not be used to initialize the NUTS sampler, simply call pymc3.sample() and it will automatically initialize NUTS in a better way.\n",
" warnings.warn('find_MAP should not be used to initialize the NUTS sampler, simply call pymc3.sample() and it will automatically initialize NUTS in a better way.')\n",
" 0%| | 0/5000 [00:00<?, ?it/s]/Users/ckrapu/miniconda3/envs/pymc3-dev/lib/python3.7/site-packages/scipy/optimize/_minimize.py:502: RuntimeWarning: Method powell does not use gradient information (jac).\n",
" RuntimeWarning)\n",
"logp = -149.47, ||grad|| = 13.248: 100%|██████████| 177/177 [00:00<00:00, 685.49it/s] \n"
"logp = -149.47, ||grad|| = 13.248: 100%|██████████| 177/177 [00:00<00:00, 591.98it/s] \n"
]
},
{
@@ -518,7 +519,7 @@
" 'sigma': array(0.96568062)}"
]
},
"execution_count": 130,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
@@ -572,7 +573,7 @@
},
{
"cell_type": "code",
"execution_count": 131,
"execution_count": 12,
"metadata": {},
"outputs": [
{
@@ -583,7 +584,7 @@
"Initializing NUTS using jitter+adapt_diag...\n",
"Multiprocess sampling (2 chains in 2 jobs)\n",
"NUTS: [sigma, beta, alpha]\n",
"Sampling 2 chains: 100%|██████████| 2000/2000 [00:02<00:00, 987.97draws/s] \n"
"Sampling 2 chains: 100%|██████████| 2000/2000 [00:02<00:00, 989.75draws/s] \n"
]
}
],
@@ -602,7 +603,7 @@
},
{
"cell_type": "code",
"execution_count": 132,
"execution_count": 13,
"metadata": {},
"outputs": [
{
@@ -611,7 +612,7 @@
"array([0.86038143, 0.88875012, 0.91392392, 0.99143432, 0.86691189])"
]
},
"execution_count": 132,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@@ -629,7 +630,7 @@
},
{
"cell_type": "code",
"execution_count": 133,
"execution_count": 14,
"metadata": {},
"outputs": [
{
@@ -641,7 +642,7 @@
">Slice: [sigma]\n",
">Slice: [beta]\n",
">Slice: [alpha]\n",
"Sampling 2 chains: 100%|██████████| 11000/11000 [00:14<00:00, 752.52draws/s]\n"
"Sampling 2 chains: 100%|██████████| 11000/11000 [00:17<00:00, 637.97draws/s]\n"
]
}
],
@@ -665,7 +666,7 @@
},
{
"cell_type": "code",
"execution_count": 134,
"execution_count": 15,
"metadata": {},
"outputs": [
{
@@ -696,7 +697,7 @@
},
{
"cell_type": "code",
"execution_count": 135,
"execution_count": 16,
"metadata": {},
"outputs": [
{
@@ -782,7 +783,7 @@
"sigma 0.99 0.07 0.00 0.85 1.12 8343.05 1.0"
]
},
"execution_count": 135,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
@@ -826,7 +827,7 @@
},
{
"cell_type": "code",
"execution_count": 136,
"execution_count": 17,
"metadata": {},
"outputs": [
{
@@ -835,22 +836,22 @@
"401"
]
},
"execution_count": 136,
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"\n",
"returns = pd.read_csv(pm.get_data('SP500.csv'),parse_dates=['date'],index_col=0)\n",
"returns = pd.read_csv(pm.get_data('SP500.csv'), parse_dates=True, index_col=0)\n",
"\n",
"len(returns)"
]
},
{
"cell_type": "code",
"execution_count": 137,
"execution_count": 18,
"metadata": {},
"outputs": [
{
@@ -888,7 +889,7 @@
},
{
"cell_type": "code",
"execution_count": 138,
"execution_count": 19,
"metadata": {
"scrolled": true
},
@@ -922,7 +923,7 @@
},
{
"cell_type": "code",
"execution_count": 139,
"execution_count": 20,
"metadata": {},
"outputs": [
{
@@ -933,7 +934,7 @@
"Initializing NUTS using jitter+adapt_diag...\n",
"Multiprocess sampling (2 chains in 2 jobs)\n",
"NUTS: [s, sigma, nu]\n",
"Sampling 2 chains: 100%|██████████| 5000/5000 [02:59<00:00, 17.80draws/s]\n",
"Sampling 2 chains: 100%|██████████| 5000/5000 [03:14<00:00, 25.70draws/s]\n",
"The acceptance probability does not match the target. It is 0.6657586191001563, but should be close to 0.8. Try to increase the number of tuning steps.\n",
"The estimated number of effective samples is smaller than 200 for some parameters.\n"
]
@@ -953,7 +954,7 @@
},
{
"cell_type": "code",
"execution_count": 140,
"execution_count": 21,
"metadata": {},
"outputs": [
{
@@ -982,7 +983,7 @@
},
{
"cell_type": "code",
"execution_count": 141,
"execution_count": 22,
"metadata": {},
"outputs": [
{
@@ -1026,7 +1027,7 @@
},
{
"cell_type": "code",
"execution_count": 142,
"execution_count": 23,
"metadata": {},
"outputs": [
{
@@ -1090,7 +1091,7 @@
},
{
"cell_type": "code",
"execution_count": 143,
"execution_count": 24,
"metadata": {},
"outputs": [
{
@@ -1139,7 +1140,7 @@
},
{
"cell_type": "code",
"execution_count": 144,
"execution_count": 25,
"metadata": {},
"outputs": [
{
@@ -1152,7 +1153,7 @@
">>Metropolis: [disasters_missing]\n",
">>Metropolis: [switchpoint]\n",
">NUTS: [late_rate, early_rate]\n",
"Sampling 2 chains: 100%|██████████| 21000/21000 [00:19<00:00, 1074.65draws/s]\n",
"Sampling 2 chains: 100%|██████████| 21000/21000 [00:30<00:00, 691.21draws/s] \n",
"The number of effective samples is smaller than 10% for some parameters.\n"
]
}
@@ -1171,7 +1172,7 @@
},
{
"cell_type": "code",
"execution_count": 145,
"execution_count": 26,
"metadata": {},
"outputs": [
{
@@ -1200,7 +1201,7 @@
},
{
"cell_type": "code",
"execution_count": 146,
"execution_count": 27,
"metadata": {},
"outputs": [
{
@@ -1247,7 +1248,7 @@
},
{
"cell_type": "code",
"execution_count": 147,
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
@@ -1307,7 +1308,7 @@
},
{
"cell_type": "code",
"execution_count": 148,
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
@@ -1350,7 +1351,7 @@
},
{
"cell_type": "code",
"execution_count": 149,
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
@@ -1369,7 +1370,7 @@
},
{
"cell_type": "code",
"execution_count": 150,
"execution_count": 31,
"metadata": {},
"outputs": [
{
@@ -1380,7 +1381,7 @@
"Initializing NUTS using jitter+adapt_diag...\n",
"Multiprocess sampling (2 chains in 2 jobs)\n",
"NUTS: [sd, x2, x1, Intercept]\n",
"Sampling 2 chains: 100%|██████████| 2000/2000 [00:01<00:00, 1018.16draws/s]\n"
"Sampling 2 chains: 100%|██████████| 2000/2000 [00:02<00:00, 980.21draws/s] \n"
]
}
],
@@ -1401,7 +1402,7 @@
},
{
"cell_type": "code",
"execution_count": 151,
"execution_count": 32,
"metadata": {},
"outputs": [],
"source": [
Oops, something went wrong.

0 comments on commit 075c896

Please sign in to comment.