Questions tagged [pymc3]

PyMC3 is a python module that implements Bayesian statistical models and fitting algorithms, including Markov chain Monte Carlo. Its flexibility and extensibility make it applicable to a large suite of problems. Along with core sampling functionality, PyMC3 includes methods for summarizing output, plotting, goodness-of-fit and convergence diagnostics.

PyMC is a python module that implements Bayesian statistical models and fitting algorithms, including Markov chain Monte Carlo. Its flexibility and extensibility make it applicable to a large suite of problems. Along with core sampling functionality, PyMC includes methods for summarizing output, plotting, goodness-of-fit and convergence diagnostics.

Source: http://pymc-devs.github.io/pymc/README.html#purpose

Docs: https://pymc-devs.github.io/pymc3/

651 questions
5
votes
1 answer

PyMC3 Gaussian Mixing Model

I've been following the Gaussian mixture model example for PyMC3 here: https://github.com/pymc-devs/pymc3/blob/master/pymc3/examples/gaussian_mixture_model.ipynb and have got it working nicely with an artificial dataset. I've tried it with a real…
Anjum Sayed
  • 623
  • 5
  • 17
5
votes
1 answer

Rewriting a pymc script for parameter estimation in dynamical systems in pymc3

I'd like to use pymc3 to estimate unknown parameters and states in a Hodgkin Huxley neuron model. My code in pymc is based off of…
5
votes
1 answer

accessing value of a random variable in PyMC3

In PyMC2, there are methods random() and value() to generate a random value, and get the current value of random variables. Is there any way to do the same in PyMC3? p = pm.Dirichlet('p', theta=np.array([1., 1., 1.])) p.random() p.value
ahmethungari
  • 1,779
  • 4
  • 16
  • 20
5
votes
1 answer

Sampling from user provided target densities in PyMC3

Is it possible to sample from a user provided target measure in PyMC3 in an easy way? I.e. I want to be able to provide black box functions logposterior(theta) and grad_logposterior(theta) that and sample from those instead of specifying a model in…
devnull
  • 147
  • 1
  • 5
5
votes
1 answer

Using the pymc3 likelihood/posterior outside of pymc3: how?

For comparison purposes, I want to utilize the posterior density function outside of PyMC3. For my research project, I want to find out how well PyMC3 is performing compared to my own custom made code. As such, I need to compare it to our own…
Rutger
  • 91
  • 4
5
votes
0 answers

PyMC: Hidden Markov Models

How suitable is PyMC in its currently available versions for modelling continuous emission HMMs? I am interested in having a framework where I can easily explore model variations, without having to update E- and M-step, and dynamic programming…
jml
  • 61
  • 4
5
votes
1 answer

pymc3: parallel computing with njobs>1 vs. GPU

I am trying to speed-up pymc3 sampling with parallelisation and I see only modest benefit. I was able to decrease total running time from 25 minutes (njobs=1) to 13 minutes (njobs=6) on i7 MacBook Pro. Due to the fact that it takes about 4 minutes…
volodymyr
  • 5,933
  • 1
  • 37
  • 40
5
votes
1 answer

Regression using PYMC3

I posted a IPython notebook here http://nbviewer.ipython.org/gist/dartdog/9008026 And I worked through both standard Statsmodels OLS and then similar with PYMC3 with the data provided via Pandas, that part works great by the way. I can't see how to…
dartdog
  • 8,974
  • 21
  • 66
  • 114
4
votes
0 answers

pymc3 using start value for LKJCholeskyCov gives Bad initial energy error

When I try to give initial start values in for the standard deviations of LKJCholeskyCov I get a bad initial energy error in pymc3. Below, the first code runs fine. But the second will give you that error. I believe I am doing something wrong in…
ilyas
  • 479
  • 6
  • 20
4
votes
1 answer

PyMC3 - coal mining disaster example - questions re: adding a second mine

I'm playing around with PyMC3, trying to fit a modified version of the mining disaster switchpoint model in the PyMC3 documentation. Suppose you had two coal-mines (mine1 and mine2), each with similar disaster counts for the same range of…
Sham Doran
  • 41
  • 2
4
votes
1 answer

PyMC3: Different predictions for identical inputs

In PyMC3, single new observations passed via set_data() are currently not handled correctly by sample_posterior_predictive(), which in such cases predicts the training data instead (see #3640). Therefore, I decided to add a second artificial row,…
fdetsch
  • 4,484
  • 3
  • 26
  • 49
4
votes
2 answers

colaboratory will not acknowledge arviz after installation and import

In Google's colaboratory, installed arviz then did import arviz without error, but in a code cell, pm.plot_posterior(samples) gets error: arviz not installed. Trying to plot Bayesian code pm.plot_posterior(samples) I expect a plot
2tan2ten
  • 99
  • 7
4
votes
1 answer

pymc3 Model fails in sampler with default init, but works with 'map'

While working through problems in "Statistical Rethinking" - I was using pymc3 to work through the "Salamanders" problem 10H4. (code below) The sampler always failed with an error : The derivative of RV alpha.ravel()[0] is zero. But when I passed…
4
votes
2 answers

Installation issues with PyMC3

I was installing PyMC3 via Anaconda. The transaction execution was done. Post this action, my Anaconda console closes immediately on open. Unable to import PyMC3 module as well. Below is the error message that pops up before the console closes. I…
xkcvk2511
  • 585
  • 1
  • 5
  • 19
4
votes
1 answer

Running a multivariate ordered logit in PyMC3

I'm trying to build a Bayesian multivariate ordered logit model using PyMC3. I have gotten a toy multivariate logit model working based on the examples in this book. I've also gotten an ordered logistic regression model running based on the example…
Maya
  • 41
  • 3
1 2
3
43 44