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
0 answers

How to create a standalone python executable with pymc3 package?

I have created a mathematical model in python. I want to make a standalone python executable for my model. The python script uses several python libraries like numpy, pandas, pymc3. I tried to make a python executable using pyinstaller and also…
0
votes
0 answers

Theano compile fails in composer

My calculations using PyMC3 fail after pushing my operators to Google Cloud Composer. Errors provided below. We've tried updating the PyPI packages of the compute environment and looked at the logs. This shows some clear errors, which seem to…
0
votes
1 answer

What exactly do Deterministic transformations do in pymc3 module

I'm using the pymc3 module for some curve fitting and while following the tutorial, I came across an unfamiliar term: Deterministic Transformations. I was just wondering what exactly these deterministic transformations do? Link to the…
0
votes
0 answers

pymc3: sample error: BrokenPipeError: [Errno 32] Broken pipe

I am new to pymc3 and was trying to write a code to do a simple Bayesian inference with MCMC. But the pm. sample just keep giving me the error: BrokenPipeError: [Errno 32] Broken pipe count_data = np.loadtxt('txtdata.csv') n_count_data =…
0
votes
1 answer

Building a weibullAFT model with covariates in PyMC3?

I'm building a Weibull AFT with covariates model for survival analysis using PyMC3 and theano.tensor. I have been reading all the notebooks associated with survival analysis in PyMC3 to build my model. However, I get the following error: *File…
viasmo1
  • 1
  • 2
0
votes
1 answer

Binomial distribution with loc parameter in pymc3

I would like to use a Binomial distribution that is shifted by the parameter loc (as in scipy) in a pymc3 model. E.g.: with pm.Model() as m1: prob = pm.Beta('prob',alpha=2,beta=2) x = pm.Binomial('x',n=20,p=prob,loc=5) But Binomial does not…
user3820991
  • 2,310
  • 5
  • 23
  • 32
0
votes
1 answer

PyMC3 - How to set the matrix shape of the beta distribution

I tried to recreate the Multilabel logistic regression example from the PyMC3 API guide with the attached data set (Production.csv). In the step of creating pm.Model() I run into difficultiies.The matrix dimensions do not work out. I do not…
0
votes
1 answer

PYMC3 Attribute Error get_default_varnames

When I try to use PyMC3 Plotting, I have the following error: AttributeError: module 'pymc3.glm.utils' has no attribute 'get_default_varnames' This is the code I am trying to plot: pm.plot_posterior(trace[3000:], …
0
votes
0 answers

Optimize with PyMC3

Problem Summary I have been optimizing my function VectorizedVcdfe, and I am still trying to optimize it. This function is responsible for 99% of the slowness of another function customFunc. This customFunc is used in a PyMC3 code block. Please…
Tyler Collins
  • 183
  • 1
  • 7
0
votes
1 answer

How to reconcile TFP with PyMC3 MCMC results?

While trying out TFP, I tried to sample from the posterior distribution of the conjugate normal model (known variance), that is x|mu ~ Normal(mu, 1.) mu ~ Normal(4., 2.) The tf.mcmc.RandomWalkMetropolis sampler gives different posterior compared to…
Pietro
  • 415
  • 6
  • 16
0
votes
1 answer

Solving simple chemical network odes in pymc3 with theano

Im trying to solve a simple chemical network A->B(reaction rate k1) and A1->B(reaction rate k2) with Bayesian inference. My hopes are to get sensitivity analysis of k1 and k2. If A, A1 and B are my constant variables only logical thing would be that…
Noob Programmer
  • 698
  • 2
  • 6
  • 22
0
votes
0 answers

Problem with type FreeRV while adding new distribution

I'm trying to add a new discrete distribution to PyMC3 (a Wallenius non-central hypergeometric) by wrapping Agner Fogs c++ version of it (https://www.agner.org/random/). I have successfully put the relevant functions in a C++ extension and added…
0
votes
0 answers

Having troubles with understanding pymc3 package

I have this example code that i am using in python with pymc3 package import pymc3 import numpy as np size = 100 # Predictor variable X1 = np.random.randn(size) X2 = np.random.randn(size) * 0.2 X3 = np.random.randn(size) * 2 alpha, sigma = 1,…
Noob Programmer
  • 698
  • 2
  • 6
  • 22
0
votes
1 answer

How to use Normal constructor correctly in pymc3?

When I use pymc3 to construct a normal distribution, I got error message. How to solve this problem? I installed PyMC3 with windows Anaconda (version Anaconda3-2019.03-Windows-x86_64.exe). And running codes from official pymc3 tutorial "Getting…
George
  • 45
  • 7
0
votes
0 answers

Scales of plots in pymc

I would like to have probability instead of frequency in the vertical axis of my traceplot in PyMC. How is it possible to set? The examples are in the photos. I realize it is easy to transform by dividing it by the number of samples, but is it…
Akim Tsvigun
  • 91
  • 1
  • 8