# Questions tagged [pymc]

PyMC is a Python library for performing Bayesian inference using MCMC. It is a Python equivalent to JAGS and BUGS.

263 questions
Filter by
Sorted by
Tagged with
7k views

### Getting started with bayesian structural models using MCMC

I'm trying to learn bayesian structural time series analysis. For a variety of reasons I need to use Python (mostly pymc3) not R so please do not suggest the ...
• 365
11k views

### Bayesian network inference using pymc (Beginner's confusion)

I am currently taking the PGM course by Daphne Koller on Coursera. In that, we generally model a Bayesian Network as a cause and effect directed graph of the variables which are part of the observed ...
• 293
913 views

### COVID in Germany, LOO-CV for time series

The paper in Science [1] infers change points in COVID spread in Germany. The authors fit the number of daily cases assuming one (red), two (orange), and three (green) change points. Every change ...
• 135
2k views

### Why are there recommendations against using Jeffreys or entropy based priors for MCMC samplers?

On their wiki page, the developers of Stan state: Some principles we don't like: invariance, Jeffreys, entropy Instead, I see a lot of normal distribution recommendation. So far I used Bayesian ...
• 615
7k views

### PyMC beginner: how to actually sample from the fitted model

I'm trying a very simple model: fitting a Normal where I assume I know the precision, and I just want to find the mean. The code below seems to fit the Normal correctly. But after fitting, I want to ...
• 363
5k views

### Bayesian model selection in PyMC3

I am using PyMC3 to run Bayesian models on my data. I am new to Bayesian modeling but according to some blogs posts, Wikipedia and QA from this site, it seems to be a valid approach to use Bayes ...
• 234
10k views

### What is pm.Potential in PyMC3?

I'm going through the Price Is Right example in chapter 5 of Probabilistic Programming & Bayesian Methods for Hackers. It reads: Example: Optimizing for the Showcase on The Price is Right ...
• 826
6k views

### Fitting model for two normal distributions in PyMC

Since I'm a software engineer trying to learn more stats you'll have to forgive me before I even start, this is serious newb territory... I've been learning PyMC and working through some really (...
• 223
3k views

### Bayesian modeling of train wait times: The model definition

This is my first attempt for somebody coming from the frequentist camp to do Bayesian data analysis. I read a number of tutorials and few chapters from Bayesian Data Analysis by A. Gelman. As the ...
• 2,505
3k views

### Probabilistic programming vs "traditional" ML

I was browsing the github repo for Pymc and found this notebook: Variational Inference: Bayesian Neural Networks The author extols the virtues of bayesian/probabilistic programming but then goes on ...
• 864
1k views

### Hierarchical Bayesian modeling of incidence rates

Kevin Murphy's book discusses a classical Hierarchical Bayesian problem (originally discussed in Johnson and Albert, 1999, p24): Suppose that we are trying to ...
2k views

• 117
1k views

### Modelling Time Series of Ratios

I’m having difficulties dealing with a time series of relations between two numbers. I have two time series, essentially a count of "successes" and "trials". What I'm interested in, though, is the ...
357 views

### MCMC Modelling - can this even be solved?

I am very new to Bayesian modelling and MCMC - I would like to know if the problem I describe below can be solved. It seems to be there is too much missing information but I wanted to get your ...
• 499
3k views

### pymc3: acceptance probabilities and divergencies after tuning

I coded two models in pymc3, which I thought are quite simple. Logistic Regression The first is a logistic regression in an experiment that models correct and wrong answers for specific tasks in a ...
8k views

### How to generate the posterior predictive distribution for hierarchal model in PYMC3

See iPython notebook for full example The below stochastic node y_pred enables me to generate the posterior predictive distribution: ...
• 323
1k views

### Understanding factor potentials in PyMC

I'm trying to understand factor potentials from the PyMC documentation, but need some help on the implementation piece--or it may turn out that I am misunderstanding how potentials work altogether. ...
3k views

### Bernoulli variable on pymc

Im not fully sure that this is the right place to ask, but I have a problem with pymc that I'm not able to grasp. I'm trying to simulate a simple counting under two different scenario: Under the ...
428 views

### Efficient MCMC using the normal approximation of the posterior

I can usually quickly get the normal approximation of the posterior distribution, but I sometimes struggle with setting up an efficient MCMC of the same model. Can I somehow use the results of the ...
• 599
348 views

### How to interpret rank bar plot of a MCMC trace?

I am learning how to use PyMC for Bayesian inference. I coded up a random intercept $Y = \gamma + \sum_{j=1}^3 \beta_j \mathbb{I}_j + \epsilon$ and looked at the trace plots. Here is a ...
• 7,168
3k views

### How to build a PyMC model to detect multiple 'switch points'?

In 'Bayesian Methods for Hackers' first chapter, Cam Davidson-Pilon presents an example model for detecting at what time point did a user's frequency of text-messaging changed. This model assumes a ...
• 151
2k views

### Finding the Poisson rate parameter with PyMC3

I'm trying to compute the rate parameter of fake set of poisson data, where I set the parameter. When I run PyMC the posterior distribution always peaks around the true rate parameter, but never ...
• 864
2k views

### PyMC3; create simple Linear Regression model with real-world datasets

The Linear Model I understand the concepts of Bayesian Inference in that the observed data, $x$, is fixed, and the parameters, $\theta$, are the random variables that follow a particular distribution....
• 1,442