Skip to main content

Questions tagged [pymc3]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
7 views

Re-sampling the posterior with a new data point in PyMC [migrated]

I have some data X = np.array([1.0, 2.0, 3.0, 4.0, 5.0]) y = np.array([0, 1, 0, 1, 1]) I fit a model ...
bayesbeginner's user avatar
1 vote
0 answers
29 views

Using output of categorical distribution in Pymc3 as index for selection of down stream parameters

The code that I would like to generate is something like: I want to have a categorical variable that maps to another value different from the index given by the categorical distribution, and fits as a ...
user359398's user avatar
0 votes
1 answer
263 views

Samples from Conditional Posterior Distribution in Pymc3

Let us consider the following Hierarchical Bayesian model: $w \sim\ Beta(20, 20)$ $K = 6$ $a = w * (K - 2) + 1$ $b = (1 - w) * (K - 2) + 1$ $theta \sim\ Beta(a, b)$ $y \sim\ Bern(theta)$ The above ...
gnikol's user avatar
  • 751
1 vote
1 answer
3k views

Pymc3 SamplingError: Initial evaluation of model at starting point failed

I am working on a Bayesian Cox Proportional Hazard model. I've started by implementing and running the Bayesian CPH example at https://docs.pymc.io/en/stable/pymc-examples/examples/survival_analysis/...
Mike's user avatar
  • 73
2 votes
1 answer
1k views

Use of pm.Potential in Pymc3 Survival example

I am working through the pymc3 Bayesian Survival Analysis example at the link below and I'm struggling to understand their use of pm.Potential: https://docs.pymc.io/...
Mike's user avatar
  • 73
0 votes
1 answer
239 views

Samples from Marginal Posterior Distribution in Pymc3

Let us consider the following Hierarchical Bayesian model: $mu \sim\ Beta(1, 1)$ $k \sim\ Exponential(1)$ $a = k*mu$ $b = (1-mu) * k$ $theta \sim\ Beta(a, b)$ $y \sim\ Bern(theta)$ The above example ...
gnikol's user avatar
  • 751
0 votes
0 answers
596 views

Is multicollinearity a problem when fitting a Bayesian regression model using ADVI?

If I’m fitting a bayesian regression model using ADVI, is it important to ensure all the covariates are uncorrelated with each other? I have a vague understanding that ADVI doesn’t play well with ...
KD89042's user avatar
  • 29
0 votes
0 answers
97 views

Uncertainty Estimation with Bayesian Inference

I am modeling a generalized extreme value distribution with the code below in PYMC3. I have defined my own distribution as the gev is still not available in pymc3. The function defined is the PDF of ...
Dawar's user avatar
  • 1
1 vote
2 answers
596 views

Recovering Bimodal distribution parameters using pymc3

I am trying to determine the parameters mu1, mu2, sigma1, sigma2, and w of a bimodal distribution using pymc3. x ~ w * Norm(u1, sigma1) + (1-w) * Norm(u1, sigma2) I use the following code: ...
Tarik's user avatar
  • 113
2 votes
1 answer
430 views

Custom Likelihood Regression Pymc3 [closed]

I am struggling to implement a linear regression in pymc3 with a custom likelihood. Suppose you have two independent variables $x_1, x_2$ and a target variable $y$, as well as an indicator variable $\...
Mike Tauber's user avatar
  • 1,057