Questions tagged [pymc3]

PyMC (formerly 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, PyMC 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.

706 questions
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
  • 7,256
  • 3
  • 42
  • 45
4
votes
0 answers

Can I install pymc version 4 without using conda?

The official instructions only talk about conda: https://www.pymc.io/projects/docs/en/latest/installation.html I'm trying to put pymc into a docker image and I don't want to use conda in the docker image. I just added pymc to requirements.txt, which…
generic_user
  • 3,430
  • 3
  • 32
  • 56
4
votes
1 answer

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions

I was trying to install pymc3 with Miniconda in Windows. The installation was certainly non-trivial and took me many hours of trouble-shooting to understand what is going on. I have read many posts from different people on this question and found…
doraemon
  • 85
  • 7
4
votes
3 answers

Cannot import pymc3 module due to geweke

I've tried installing it on a separate env and installing arviz separately. The import pymc3 as pm will not work. AttributeError: module 'arviz' has no attribute 'geweke'
user15810398
  • 41
  • 1
  • 2
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
  • 609
  • 9
  • 25
4
votes
1 answer

How to set "observed" property of PyMC3 random variables derived from unobserved random variables

I'm working with PyMC3 and unsure about how to mark certain variables as "observed". In a simple example, I could have two input variables modeled as a uniform distribution on [0, 1]. I know a third "output" random variable is equal to the product…
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
0 answers

how to fix ImportError: DLL load failed

I am running Python 3.8 on Windows 10 Pro. I am attempting to fit a multinomial fixed effects model to some data. All the packages appear to load fine, the data loads and can be manipulated and viewed. But I get an error when I call a module that my…
BLBerger
  • 41
  • 1
4
votes
1 answer

Recovering sine function paramters in PyMC3

I am unable to understand why the following code is not able to recover the paramters of the model. The same method was able to recover the parameters in a quadratic polynomial quite well. Please help. def sin(a,b,c,d,x): return a +…
Ayush Sahu
  • 43
  • 3
4
votes
1 answer

Bayesian Calibration with PyMC3, Kennedy O'Hagan

I'm quite new to probabilistic programming and pymc3... Currently, I want to implement the Kennedy-O’Hagan framework in pymc3. The setup is according to the paper of Kennedy and O'Hagan as follows: We have n observations zi of the form zi = f(xi ,…
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
  • 5,239
  • 3
  • 30
  • 58
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
  • 109
  • 1
  • 9
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
0 answers

Integrate function of random variables in pymc3

I am trying to construct a model in pymc3 which requires me to integrate a function of random variables. The basic idea using actual numbers is this: from scipy.integrate import quad def PowerLaw(x,N0,alpha): """ A PowerLaw distribution""" …