# Questions tagged [pymc3]

The tag has no usage guidance.

10 questions
Filter by
Sorted by
Tagged with
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 ...
1 vote
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 ...
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 ...
• 751
1 vote
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/...
• 73
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/...
• 73
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 ...
• 751
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 ...
• 29
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 ...
1 vote
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: ...
• 113
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 \$\...