Skip to content

Commit 419cc71

Browse files
committed
Applying pre-commit changes
1 parent b1f16f4 commit 419cc71

File tree

4 files changed

+76
-183
lines changed

4 files changed

+76
-183
lines changed

examples/case_studies/factor_analysis.ipynb

Lines changed: 67 additions & 175 deletions
Large diffs are not rendered by default.

examples/case_studies/log-gaussian-cox-process.ipynb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@
5353
"outputs": [],
5454
"source": [
5555
"from itertools import product\n",
56-
"from numpy.random import default_rng\n",
5756
"\n",
5857
"import arviz as az\n",
5958
"import matplotlib.pyplot as plt\n",
6059
"import numpy as np\n",
6160
"import pandas as pd\n",
62-
"import pymc3 as pm"
61+
"import pymc3 as pm\n",
62+
"\n",
63+
"from numpy.random import default_rng"
6364
]
6465
},
6566
{
@@ -227,8 +228,8 @@
227228
"\n",
228229
"# Jitter the data slightly so that none of the points fall exactly\n",
229230
"# on cell boundaries\n",
230-
"eps = 1e-3\n",
231-
"rng = default_rng()\n",
231+
"eps = 1e-3\n",
232+
"rng = default_rng()\n",
232233
"xy = xy.astype(\"float\") + rng.standard_normal(xy.shape) * eps\n",
233234
"\n",
234235
"resolution = 20\n",
@@ -324,7 +325,7 @@
324325
"with pm.Model() as lgcp_model:\n",
325326
" mu = pm.Normal(\"mu\", sigma=3)\n",
326327
" rho = pm.Uniform(\"rho\", lower=25, upper=300)\n",
327-
" variance = pm.InverseGamma('variance', alpha=1, beta=1)\n",
328+
" variance = pm.InverseGamma(\"variance\", alpha=1, beta=1)\n",
328329
" cov_func = variance * pm.gp.cov.Matern52(2, ls=rho)\n",
329330
" mean_func = pm.gp.mean.Constant(mu)"
330331
]
@@ -573,7 +574,7 @@
573574
"with lgcp_model:\n",
574575
" intensity_new = gp.conditional(\"intensity_new\", Xnew=xy_new)\n",
575576
" spp_trace = pm.sample_posterior_predictive(trace, var_names=[\"intensity_new\"])\n",
576-
" intensity_samples = spp_trace['intensity_new']"
577+
" intensity_samples = spp_trace[\"intensity_new\"]"
577578
]
578579
},
579580
{

examples/gaussian_processes/GP-MeansAndCovs.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2493,4 +2493,4 @@
24932493
},
24942494
"nbformat": 4,
24952495
"nbformat_minor": 4
2496-
}
2496+
}

examples/generalized_linear_models/GLM-out-of-sample-predictions.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,4 +652,4 @@
652652
]
653653
}
654654
]
655-
}
655+
}

0 commit comments

Comments
 (0)