Questions tagged [pymc]

PyMc is a Python module for providing Bayesian statistical models, algorithms and estimations. Two versions are currently widely used: 2 and 3, that are significantly different. Version 2 is not supported anymore, but version 3 is not fully compatible with previous codes and translating a V2-code to V3 is not always straightforward. If you have a PyMc question specific to V3, consider using the [pymc3] tag in addition to the [pymc] tag.

Pymc is a Python module for providing Bayesian statistical models and algorithms. It requires Numpy. PyMC includes methods for summarizing output, plotting, goodness-of-fit and convergence diagnostics.

According to its documentation, Pymc's notable features include:

  • Bayesian statistical models with Markov chain Monte Carlo and other algorithms.
  • A suite of statistical distributions.
  • A module for modeling Gaussian processes.
  • Creates summaries including tables and plots.
  • Extensible

Source: https://github.com/pymc-devs/pymc
Pypi: https://pypi.python.org/pypi/pymc
Docs: http://pymc-devs.github.io/pymc/

511 questions
0
votes
1 answer

Beta-distributed linear model in PyMC

Picking up on what should have been a question here rather than on the old Google Groups, I have been looking to parameterize a Beta-distributed linear model in PyMC, which Chris Fonnesbeck has suggested as being: "just a reparameterization of the…
0
votes
2 answers

Trouble with pymc library

I am trying to run the following code: import pymc as pm alpha = 1.0/count_data.mean() #count_data is the variable that holds txtc lambda_1 = pm.Exponential("lambda_1", alpha) lambda_2 = pm.Exponential("lambda_2", alpha) tau =…
0
votes
1 answer

Pymc and binomials: How to fit 7 binomials to data

I have this problem: I have a cohort of individuals grouped in 5 age groups. Initially all of them are susceptible and then they develop disease and finally they have cancers. I have information about the age group distribution of the susceptible…
0
votes
1 answer

Define different bounds for a multidimentional stochastic variable in pymc

I'm having an issue with defining bounds for a multidimentional stochastic variable. Here is a dummy exemple to explain my problem. If I want to have a 3 dimension discrete uniform between [0,100] import pymc as mc from numpy import empty truth =…
0
votes
1 answer

Abort Trap 6 error installing PyMC on OSX 10.7

I built and installed PyMC from source. It's taken a lot of debugging, but after a long time I succeeded at installing it. However, now when I try to import it, it's giving me an Abort Trap: 6 error. Enthought Python Distribution --…
Wesley Tansey
  • 4,555
  • 10
  • 42
  • 69
0
votes
2 answers

How to build a model requiring external package in PyMC3?

I'm not sure if this is a PyMC3 question or a Theano question. I've used PyMC2 for a long time to fit a cosmology to supernova data. This requires some messy integrals (see i.e. http://arxiv.org/abs/astroph/9905116 ) So I use a package in python…
Brian Hayden
  • 359
  • 2
  • 10
0
votes
1 answer

Plotting binomial MCMC

I'm struggling with a problem of binomial and pymc I have a sample divided in groups and I would like to evaluate using MCMC the transition rate from the status Susceptible to Infected and plot the results in a way similar to here when I compile the…
0
votes
2 answers

How to implement a function of a random variable in PyMC which could be sampled by MCMC Metropolis?

If you have a random variable $X$ and a function $f$, you can define $y=f(X)$ as a new random variable with a probability density function as follows: $p(y)=(f^{-1})'(y)p(x)$. For details see here. Now I have defined a random variable alpha, with an…
Cupitor
  • 11,007
  • 19
  • 65
  • 91
0
votes
1 answer

PyMC Pareto + Normal with unknown alpha doesn't converge for very small noise

I'm trying to use pymc to solve a simple model: I have N=1000 fluxes that I know are drawn from a Pareto distribution: flux ~ Pareto(alpha, 1) I'm trying to work out the alpha parameter of the Pareto: alpha ~ Uniform(1, 3) My flux measurements are…
freddofrog
  • 101
  • 6
0
votes
1 answer

Dynamic (ODE-based) model in PyMC

I am a beginner with PyMC (https://github.com/pymc-devs/pymc) and am trying to construct a model with a dynamic component, essentially solving a small system of ordinary differential equations (ODEs) each time the model is called. I have searched…
cytochrome
  • 549
  • 1
  • 4
  • 16
0
votes
1 answer

PyMC regression of many regressions?

I haven't been using PyMC for long, but I was pleased at how quickly I was able to get a linear regression off the ground (this code should run without modification in IPython): import pandas as pd from numpy import * import…
agartland
  • 1,654
  • 2
  • 15
  • 19
0
votes
1 answer

Using PyMC to perform double integration

I need to perform double integration using MCMC method. I have already done it using romberg and doublequad integrations with correct results. I need to also use MCMC integration to compare the results. I found it difficult to understand PyMC. The…
Arjun
  • 1,259
  • 1
  • 13
  • 25
-1
votes
1 answer

Bayesian Network Model Size Calculation

How do you calculate the (storage) size of a Bayesia Network model with n nodes/features/columns/attributes and k arcs? The model may be generated through pymc or pomegranate.
Reacher234
  • 230
  • 2
  • 11
-1
votes
1 answer

pymc determine sum of random variables

I have two independent Normal distributed random variables a, b. In pymc, it's something like: from pymc import Normal def model(): a = Normal('a', tau=0.01) b = Normal('b', tau=0.1) I'd like to know what's a+b if we can see it as a…
-1
votes
1 answer

pymc: Inferring parameters based on functions of observables

I have observations of several optical emission lines, and I have a model that predicts several (flux) ratios of those lines, based on two parameters, q and z, which I want to infer. I have created @pymc.deterministic objects that take values of q…
DathosPachy
  • 742
  • 1
  • 6
  • 17
1 2 3
34
35