pymc-devs / pymc-examples Goto Github PK
View Code? Open in Web Editor NEWExamples of PyMC models, including a library of Jupyter notebooks.
Home Page: https://www.pymc.io/projects/examples/en/latest/
License: MIT License
Examples of PyMC models, including a library of Jupyter notebooks.
Home Page: https://www.pymc.io/projects/examples/en/latest/
License: MIT License
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-logistic.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
The following are existing issues & suggestions in the pymc3-examples repo after going through an iteration of renaming plot dependencies from pm.
to arviz.
Note: This is similar to the pre-existing #34 issue.
returninference =True
"return_inferencedata
should be manually set, either to True or to False, but one of the two to avoid the warning.
If False, an inferencedata
should be created within the model context, and passed to arviz. This will
az.plot_xyz(trace)
works because ArviZ internally converts the data to inferencedata, then plots."traces = []
models = []
names = ["Partial conjugate sampling", "Full NUTS"]
for use_conjugate in [True, False]:
with pm.Model() as model:
tau = pm.Exponential("tau", lam=1, testval=1.0)
alpha = pm.Deterministic("alpha", tau * np.ones([N, J]))
p = pm.Dirichlet("p", a=alpha)
if use_conjugate:
# If we use the conjugate sampling, we don't need to define the likelihood
# as it's already taken into account in our custom step method
step = [ConjugateStep(p.transformed, counts, tau)]
else:
x = pm.Multinomial("x", n=ncounts, p=p, observed=counts)
step = []
trace = pm.sample(step=step, chains=2, cores=1, return_inferencedata=True)
traces.append(trace)
assert all(az.summary(trace)["r_hat"] < 1.1)
models.append(model)
"Since we are not storing the summary dataframe anywhere and we only want the rhat, we should use rhat instead. The assertion can be done with:
assert (az.rhat(trace).to_array() < 1.1).all()
"
Similar to PR 43, for line 33 at variable trace =
Y_obs = pm.Lognormal("Y_obs", mu=pm.math.log(forward), sigma=sigma, observed=Y)
trace = pm.sample(1500, init="jitter+adapt_diag", cores=1)
trace["diverging"].sum()
I changed init from adapt_diag
to jitter+adapt_diag
& added param cores=1
.
The error:
SamplingError: Bad initial energy
ax = (
dfll["log_likelihood"]
.unstack()
.plot.bar(subplots=True, layout=(1, 2), figsize=(12, 6), sharex=True)
)
ax[0, 0].set_xticks(range(5))
ax[0, 0].set_xticklabels(["k1", "k2", "k3", "k4", "k5"])
ax[0, 0].set_xlim(-0.25, 4.25);
One dependency errors out, this making remainder of notebook not run.
Errors on missing sd_log__
, and therefore cannot run entire notebook due to dependency.
Particularly
GLM-model-selection KeyError: 'var names: "['sd_log__'] are not present" in dataset'
dfll = pd.DataFrame(index=["k1", "k2", "k3", "k4", "k5"], columns=["lin", "quad"])
dfll.index.name = "model"
for nm in dfll.index:
dfll.loc[nm, "lin"] = -models_lin[nm].logp(
az.summary(traces_lin[nm], traces_lin[nm].varnames)["mean"].to_dict()
)
dfll.loc[nm, "quad"] = -models_quad[nm].logp(
az.summary(traces_quad[nm], traces_quad[nm].varnames)["mean"].to_dict()
)
dfll = pd.melt(dfll.reset_index(), id_vars=["model"], var_name="poly", value_name="log_likelihood")
dfll.index = pd.MultiIndex.from_frame(dfll[["model", "poly"]])
Hi 👋 ! I am very interested in the glm
module of PyMC3, specially using it for prediction problems. There is an active thread about this topic: “Out of sample” predictions with the GLM sub-module. I wrote a small post summarising the potential solutions : https://juanitorduz.github.io/glm_pymc3/ Is this something you would be interested in having on the examples? If so, is it ok as it is now or do you want me to reduce it a just focus on the out-of-sample section. I am happy to contribute to the documentation 🚀 .
File: https://nbviewer.jupyter.org/github/pymc-devs/pymc-examples/blob/main/examples/case_studies/log-gaussian-cox-process.ipynb
Reviewers: @ckrapu
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
from_pymc3_predictions
to filter nans and slice/reduce intensity_samples
None
Model takes roughly 5 mins to sample.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-SparseApprox.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/diagnostics_and_criticism/Bayes_factor.ipynb
Reviewers: @aloctavodia
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
Cell 6 contains:
lengthscale = 0.2
eta = 2.0
cov = eta ** 2 * pm.gp.cov.ExpQuad(1, lengthscale)
X = np.linspace(0, 2, 200)[:, None]
K = cov(X).eval()
plt.figure(figsize=(14, 4))
plt.plot(X, pm.MvNormal.dist(mu=np.zeros(K.shape[0]), cov=K).random(size=3).T)
plt.title("Samples from the GP prior")
plt.ylabel("y")
plt.xlabel("X");
which throws
ValueError: input operand has more dimensions than allowed by the axis remapping
As per #11 , I can fix this by specifying the shape of the MvNormal:
lengthscale = 0.2
eta = 2.0
cov = eta ** 2 * pm.gp.cov.ExpQuad(1, lengthscale)
X = np.linspace(0, 2, 200)[:, None]
K = cov(X).eval()
plt.figure(figsize=(14, 4))
plt.plot(X, pm.MvNormal.dist(mu=np.zeros(K.shape[0]), cov=K, shape=K.shape[0]).random(size=3).T)
plt.title("Samples from the GP prior")
plt.ylabel("y")
plt.xlabel("X");
but then I get
~/pymc3-dev/pymc3/distributions/multivariate.py in random(self, point, size)
277
278 if self._cov_type == "cov":
--> 279 chol = np.linalg.cholesky(param)
280 elif self._cov_type == "chol":
281 chol = param
<__array_function__ internals> in cholesky(*args, **kwargs)
~/miniconda3/envs/pymc3-dev-py38/lib/python3.8/site-packages/numpy/linalg/linalg.py in cholesky(a)
762 t, result_t = _commonType(a)
763 signature = 'D->D' if isComplexType(t) else 'd->d'
--> 764 r = gufunc(a, signature=signature, extobj=extobj)
765 return wrap(r.astype(result_t, copy=False))
766
~/miniconda3/envs/pymc3-dev-py38/lib/python3.8/site-packages/numpy/linalg/linalg.py in _raise_linalgerror_nonposdef(err, flag)
89
90 def _raise_linalgerror_nonposdef(err, flag):
---> 91 raise LinAlgError("Matrix is not positive definite")
92
93 def _raise_linalgerror_eigenvalues_nonconvergence(err, flag):
LinAlgError: Matrix is not positive definite
cc @Sayam753 any suggestions?
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/diagnostics_and_criticism/model_comparison.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-MaunaLoa2.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/hierarchical_partial_pooling.ipynb
Reviewers: @OriolAbril
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
plot_forest
to avoid having to manually set the yticklabels. We'd instead use coords for that.
None
Model runs in roughly a minute
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/conditional-autoregressive-model.ipynb
Reviewers: @junpenglao
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
None
Most models run in less than 2 minutes, one seems to take ~5mins
file: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/multilevel_modeling.ipynb
This notebook endured a significant rewrite not too long ago, and is one of the go to examples on ArviZ+xarray usage. This is both its main pro and its own downfall. There are some nits to keep it up to its current golden standard.
The notebook should be reexecuted with latest pymc3 and have the warning filter removed (there should be no warnings, if there are they should be fixed). Moreover, rerunning with latest ArviZ will generate much more aesthetically pleasing forestplots. legend=True
should be used for forestplots with multiple models.
The plot forest on cell 42 should use the approach described in arviz-devs/arviz#1627 to avoid showing the 1 dots that correspond to the elements in the diagonal.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-smoothing.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-model-selection.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-TProcess.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-poisson-regression.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
np.exp(np.mean())
instead of np.mean(np.exp())
.kind="stats"
or customize summary, examples of both at: https://arviz-devs.github.io/arviz/api/generated/arviz.summary.htmlNone
Models sample in less than a minute
[BEGINNER-FRIENDLY]
Our notebooks gallery is quite big, so:
FutureWarnings
that should be addressed (not listed).So this issue is here to signal it would be nice if people want to take some time updating and re-running the notebooks below with PyMC 3.9, according to this style page 🎉
Do it in small batches though, to not get bored and enjoy it 😉 Thanks a lot in advance for your help and don't hesitate to ask your questions below!
PyMCheers 🖖
Here is an up-to-date list of the most outdated and problematic NBs (those not listed here should be checked for style and updating accordingly):
blackbox_external_likelihood
needs Cythonconvolutional_vae_keras_advi
needs KerasGLM
theano.gof.fg.MissingInputErrorGLM-poisson-regression
KeyError: "['hpd_2.5', 'hpd_97.5'] not in index"GLM-negative-binomial-regression
KeyError: "['hpd_97.5', 'hpd_2.5'] not in index"GLM-model-selection
KeyError: 'var names: "['sd_log__'] are not present" in dataset'GP-MaunaLoa2
ValueError: Units 'M' and 'Y' are no longer supportedGP-MaunaLoa
ValueError: Units 'M' and 'Y' are no longer supported, as they do not represent unambiguous timedelta values durations.GP-TProcess
runs but has way too many divergences; timed out after 14_000 secondsPyMC3_tips_and_heuristic
KeyError: Rhatdependent_density_regression
AttributeError: 'DataFrame' object has no attribute 'range'hierarchical_partial_pooling
not enough values to unpack (expected 2, got 1)lda-advi-aevb
TypeError: init() got an unexpected keyword argument 'n_topics'marginalized_gaussian_mixture_model
AttributeError: 'Rectangle' object has no property 'normed'GLM-logistic
AttributeError: 'Rectangle' object has no property 'normed'model_averaging
FileNotFoundError: File ../data/milk.csv does not existmodel_comparison
AttributeError: 'ELPDData' object has no attribute 'WAIC'multilevel_modeling
More chains (4000) than draws (2) and some plots may be wrongprofiling
has a shape errorrugby_analytics
ValueError: not enough values to unpack (expected 2, got 1)sampling_callback
has a shape error (looks like a threading problem)survival_analysis
cell 11 raises a NotImplementedError in numpy/pandasweibull_aft
AttributeError: module 'statsmodels' has no attribute 'datasets'ODE_with_manual_gradients
ValueError: array must not contain infs or NaNsfile: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/putting_workflow.ipynb
See tracker and its description
notes: consider creating a logit_idata
and a logit_trace = logit_idata.posterior
(and the same for other models). I think this will minimize the need to modify the code. That being said, I would not expect updating it to be a walk in the park. I'd recommend working on this only if you are already familiar and more or less comfortable with xarray.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-MeansAndCovs.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-MaunaLoa.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-Circular.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/diagnostics_and_criticism/model_averaging.ipynb
Reviewers: @aloctavodia
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
e.g. Normal('x', mu=mu, sigma=sigma)
rather than Normal('x', mu=mu, sd=sigma)
sd
will (silently) continue working, see pymc-devs/pymc#4344
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/diagnostics_and_criticism/posterior_predictive.ipynb
Reviewers: @AlexAndorra @lucianopaz
Note: Please refer to notebook updates overview for more details on some of the bullet points below
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
sample_posterior_predictive
? Or should that be another more specific notebook not focused on model criticism but purely on pymc3 usage? (i.e. a howto instead of a diagnostics_and_criticism notebook).None
All models seem to sample in under a minute
The two notebooks are covering exactly the same issue.
They seem short enough that we could use the same dataset and show one after the other. This way we also get a chance to nudge users to try the marginalized mixture, which usually works better.
https://docs.pymc.io/notebooks/gaussian_mixture_model.html
https://docs.pymc.io/notebooks/marginalized_gaussian_mixture_model.html
The notebook needs to be modified to use ArviZ+InferenceData at the very least, it's hard to know what extra work will be needed as it has not been executed for a while, cython usage is tricky to get right. Note that it uses DensityDist
is strange ways, using dicts as observed
that contain freeRVs
and will need to use density_dist_obs=False
as idata_kwargs
(ref)
I don't think this notebook can be converted to v4 unless it undergoes a significant rewrite. Not sure if we should try to get it working with a custom distribution or with pm.Potential
for v4.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-Kron.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/factor_analysis.ipynb
Reviewers: ?
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
return_inferencedata=True
Deterministic
to "choose" which values to plot, use coords
when calling the plotting functionsshape
None
Models seem to take between 1-5 minutes to sample
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/probabilistic_matrix_factorization.ipynb
Reviewers: @ColCarroll
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
_norms
in code cell 23 looks like it could be replaced by xr.apply_ufunc
(using input_core_dims
)None
Model samples in roughly 1 hour
The notebook should use InferenceData and ArviZ for plotting. Note that the names of the sampler stats in ArviZ are different, the naming convention for ArviZ can be found at https://arviz-devs.github.io/arviz/schema/schema.html#sample-stats, doc which should be linked too.
I think it would be a good addition to add a plot_parallel as a quick way to visualize divergences or to link to the notebook on divergences.
file: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/rugby_analytics.ipynb
The inital exploratory analysis looks ok, seaborn is an ok dependency for this, the model needs to be updated, no flat priors for example and we should also use coords+dims and ArviZ for posterior analysis and exploration.
Notes: updates on the model and priors can be taken from https://github.com/arviz-devs/arviz_example_data/blob/main/rugby.ipynb.
coords
is a very useful feature that not enough people know about. Our docs should establish best practices so using it in our NBs is an important step.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-Marginal.ipynb
Reviewers: @bwengals
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
None
A couple models seem to take ~20 mins to run.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/BEST.ipynb
Reviewers: @twiecki @fonnesbeck
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
None
Models sample in less than a minute
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/stochastic_volatility.ipynb
Reviewers:
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
arviz-darkgrid
stylereturn_inferencedata=True
None
Model takes roughly 15 mins to sample
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-hierarchical.ipynb
Reviewers: @twiecki
The sections below may still be pending. If so, the issue is still available, it simply doesn't have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
None
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/GP-Latent.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/case_studies/LKJ.ipynb
Reviewers: @AlexAndorra
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
.values
instead of .data
.Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
None
All models run in less than a minute
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-negative-binomial-regression.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-hierarchical-binominal-model.ipynb
Reviewers: @OriolAbril
Notebook had a PR to update it to "Best Practices" before the start of the tracking project.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/gaussian_processes/gaussian_process.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
Currently we only have the doc string, but a good example NB on what it is, how to use it etc would go a long way.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/diagnostics_and_criticism/Diagnosing_biased_Inference_with_Divergences.ipynb
Reviewers: ?
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-out-of-sample-predictions.ipynb
Reviewers:
The sections below may still be pending. If so, the issue is still available, it simply doesn't
have specific guidance yet. Please refer to this overview of updates
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
Changes listed in this section are up for discussion, these are ideas on how to improve
the notebook but may not have a clear implementation, or fix some know issue only partially.
The updated PR #25 resulted in differences in results for a pre-existing notebook, seen in Review of examples/diagnostics_and_criticism/Diagnosing_biased_Inference_with_Divergences.ipynb
There was an upgrade from PyMC3 V3.9 to V 3.11.
For example here are the Installation instructions:
Installation
Running PyMC3 requires a working Python interpreter, either version 2.7 (or more recent) or 3.5 (or more recent); we recommend that new users install version 3.5. A complete Python installation for Mac OSX, Linux and Windows can most easily be obtained by downloading and installing the free Anaconda Python Distribution by ContinuumIO.
https://github.com/pymc-devs/pymc-examples/blob/main/examples/getting_started.ipynb
File: https://github.com/pymc-devs/pymc-examples/blob/main/examples/generalized_linear_models/GLM-linear.ipynb
Reviewers:
Please refer to the notebook updates overview for more detailed guidance on the points below
Changes listed in this section should all be done at some point in order to get this
notebook to a "Best Practices" state. However, these are probably not enough!
Make sure to thoroughly review the notebook and search for other updates.
figsize
as kwarg to plot_trace
, not as plt.figure
argument.Should that notebook mention bambi at some point? cc @aloctavodia
I think it needs patsy, not completely sure if it' installed with pymc3 or if it's an optional dependency.
Models run in less than 30 seconds.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.