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
0
votes
1 answer

GLM posterior predictive not plotting over complete range of data

[I ][1] I can not figure out why the glm posterior predictive is not plotting over the entire data, but only over a fraction of it. And there seem to be no parameters which can alter these. This is the code which generates the following problematic…
Ayush Sahu
  • 43
  • 3
0
votes
0 answers

PyMC3: Defining centered covariates in the model specification

Good morning, I'm in the process of learning PyMC3 and to start, I generated some synthetic data to use in estimating a Poisson regression. One thing I realized quickly is that I needed to make my model covariates zero mean and unit variance prior…
Chris
  • 3,109
  • 7
  • 29
  • 39
0
votes
0 answers

Updating a simple bayesian model with a set of new data coming in every 10 minutes in Python

I am new with Bayesian Inference in Python and I wish to perform Bayesian updating with new data every time it is generated (10-min frequency). This means I will not perform it on a known set of data but update the model with singular datum every…
mats_snaps
  • 57
  • 6
0
votes
1 answer

PYMC3 - Random Walk Forecasting

I was hoping someone may be able to clarify something for me. I am trying to do a timeseries forecasting with the GaussianRandomWalk function in PyMC3. I have been suggested that my code is wrong as I’ve modeled it so that the standard deviation of…
Bjorn
  • 1
0
votes
0 answers

issue with importing Pymc3

I am trying to import PyMC3 but unfortunately there is some kind of clash withe one of the libraries already installed: import pymc3 --------------------------------------------------------------------------- AttributeError …
Filippo Sebastio
  • 1,112
  • 1
  • 12
  • 23
0
votes
1 answer

Iterating a Numpy Array for random.normal generator shape conflict

I am trying to generate n (in this case n=57) random numbers from a normal distribution for a number of sampled mean and standard deviations from a PyMc3 model (in this case 350). So I ultimately want to end up with 350 distributions of 57 length…
NavArch
  • 121
  • 6
0
votes
1 answer

How to get the specific probability of a particular value in a distribution?

I’m a PyMC3 beginner, I started three weeks ago to familiarize myself with it and I’m doing currently a learning work so I have one doubt in my program. Sorry if it is a stupid question. I have that model: with pm.Model() as clientes: …
EduardoCabria
  • 29
  • 1
  • 4
0
votes
1 answer

Error Arviz not installed Using in Google Colab Pymc3

I want to plot using pm.traceplot(mcmc_trace,['theta']) in Google Colab but getting error: ImportError: ArviZ is not installed. In order to use plot_trace: pip install arviz NOTE: If your import is failing due to a missing package, you can manually…
Fahad
  • 128
  • 1
  • 3
  • 12
0
votes
1 answer

Why does pymc3 run even when I don't include any observations?

Even when I don't include any observed values, pymc3 will still run and give me results. Is this just sampling from the prior without the likelihood? ''' import pymc3 as pm model = pm.Model() with model: # Define the prior of the parameter…
ramen_noodles
  • 53
  • 1
  • 8
0
votes
1 answer

pymc3: Why is everything in terms of log?

I'm trying to wrap my head around pymc3, which seems to be a beautiful package. One thing I don't understand is why all of the probabilities are in log? The description of the Beta Distribution says it is the "Beta log-likelihood". The functions for…
benjaminjsanders
  • 827
  • 8
  • 13
0
votes
1 answer

PyMC3: Giving a Different Result Every time

I have defined a log-likelihood function and I have one variable being sampled over a uniform distribution. I made sure the log-likelihood function returns the same result for same input. But when I sample, every time the distribution is somewhat…
user1581390
  • 1,900
  • 5
  • 25
  • 38
0
votes
0 answers

"TypeError: 'Model' object is not callable" when trying to build a basic model using pymc3

I'm having trouble getting a basic example using the pymc3 package to run. the example comes from this tutorial on building Markov Chain Monte Carlo models using python. When I get to any loop that attempts to build a model, I get an error that…
drRussClay
  • 175
  • 1
  • 1
  • 7
0
votes
1 answer

trying to use DiscreteUniform as an numpy index

I am trying to use pymc3.DiscreteUniform as an index for a numpy 1D array This worked with pymc (v2) but I am transitioning to pymc3 and code that worked under pymc don't work under pymc3. import pymc3 as pm d0 = pm.DiscreteUniform('d0', lower=0,…
Ken Dere
  • 1
  • 1
  • 1
0
votes
0 answers

Conditionally using distributions in pymc3

In pymc3 how would I create a condition a switch statement around distributions? """ If True, use mu1, else use mu2? """ with pm.Model() as model_lkj: category = pm.Categorical('category', p=[0.5, 0.5]) # cat == 1: mu1 =…
Rob
  • 3,333
  • 5
  • 28
  • 71
0
votes
0 answers

Conditional Logit model in pymc3

I am trying to create a conditional logit model in pymc3. I have code that generates parameters that identify the correct categories in my toy problem. However, the parameters that it produces are far from optimal. Below I show a version where I…