511 questions
2
votes
1
answer
298
views
In PyMC, the "thin" argument seems no more in use. What can be put instead?
Trying to understand PyMC through examples, I made a small model referring to a set of birds weight (data observed: y20), supposedly coming from a normal population N(mu, sigma).
import pymc as pm
...
3
votes
0
answers
195
views
Implementing ERGMs with PyMC
I am trying to implement ERGMs with PyMC.
I've found this, this, this and this, but these resources are a bit dated.
I have an NxN matrix for each network statistic (density, triangles, istar2, istar3 ...
1
vote
0
answers
84
views
How to pass a coordinate to inference data
I've been skimming through Arviz documentation and came across 8 school inference data.
import arviz as az
idata = az.load_arviz_data("centered_eight")
Inference data object also includes ...
1
vote
0
answers
339
views
Pymc how to fix shape issues
I have data like this (there 5 different shops: 0 ,1,2,3,4)
sales shop
0 117 0
1 0 0
2 0 0
3 134 1
4 0 2
I need to determine distribution for ...
0
votes
1
answer
295
views
How can I get test_value in PyMC(PyMC4)?
I am a newbie in Bayesian and Probabilistic inference, and sorry for this basic question. Recently I am following some examples in Bayesian Methods. And, the examples require me to use "tag....
4
votes
0
answers
681
views
Can I install pymc version 4 without using conda?
The official instructions only talk about conda:
https://www.pymc.io/projects/docs/en/latest/installation.html
I'm trying to put pymc into a docker image and I don't want to use conda in the docker ...
1
vote
1
answer
417
views
must be real number, not TensorVariable
My code is:
h = pm.Normal("h", mu=0.0, sigma=0.1)
a = pm.Normal("a", mu=mu_a, sigma=tau_a, dims="h")
d = pm.Normal("d", mu=mu_d, sigma=tau_d, dims="a")...
3
votes
1
answer
583
views
How to use PyMC (v4.0.1) with statsmodels to estimate state space models?
I am trying to use PyMC (v4.0.1) with statsmodels to estimate state-space models. I am following this example that uses PyMC3:
https://www.statsmodels.org/v0.12.0/examples/notebooks/generated/...
0
votes
0
answers
440
views
Pymc3 parameter estimation using custom likelihood function sampling error
I try to estimate parameters with a custom complex likelihood function (with 5 parameters to be estimated) using pm.DensityDist:
with pm.Model() as model:
# Define priors for unknown model ...
0
votes
0
answers
76
views
pymc.Uniform giving ZeroProbability error: Stochastic alpha's value is outside its support, or it forbids its parents' current values
I am using a example given in web of pymc, when I try to run pymc.Uniform I am getting the following error
---------------------------------------------------------------------------
ZeroProbability ...
0
votes
0
answers
257
views
How to solve the Mass matrix error with degree of freedom and scale parameters of Student T distribution using Pymc3?
I have been working using the following codes to acquire the Bayesian Fusion of StudentT distribution.
Fusion code:
def S2_0_Bayesian_Interface(data):
##################################################...
6
votes
1
answer
918
views
How to do simple survival analysis with pymc3 (Weibull distribution regression)?
I'm new to using pymc3, I've read Bayesian Methods for Hackers and done my best to work through existing survival analysis tutorials in pymc3. However, I don't understand how to write/interpret the &...
1
vote
1
answer
1k
views
what is stable release version with regards to pymc3, arviz and theano packages?
I was working with Spyder IDE with python version 3.8.5 and I was using pymc3 (can't remember the exact version) and it was working fine and after upgrading scipy, spyder and python, everything went ...
2
votes
1
answer
374
views
pyMC3 - Using the value of a variable
I am simulating a very basic Bayesian Network using pyMC3. In this simulation, I have only categorical variables. Given the value of a variable, I would like to set the distribution of another ...
5
votes
0
answers
356
views
Incremental Bayesian updates with multi-dimensional parameters
I am trying to use PYMC3 for a Bayesian model where I would like to repeatedly train my model on new unseen data. I am thinking I would need to update the priors with the posterior of the previously ...
0
votes
1
answer
268
views
Compute probability of parameters given data in a bayesian network with pyMC3
I’m new to pyMC3 and I would like to know if it is possible to use it to solve the following problem: I have a bayesian network (image of my BN: Bayesian network of my problem) and I don’t know the ...
0
votes
1
answer
1k
views
How to decide on what priors distributions to use for parameters in PyMC3?
I am looking into PyMC3 package where I was interested in implementing the package in a scenario where I have several different signals and each signal has different amplitudes.
However, I am stuck ...
2
votes
1
answer
97
views
How to make sense of the use of `yield` in PyMC models? [duplicate]
I am not a user of PyMC myself, but recently I stumbled upon this article that showed a snippet of some PyMC model:
def linear_regression(x):
scale = yield tfd.HalfCauchy(0, 1)
coefs = yield ...
0
votes
3
answers
65
views
How to relate an array of integers to an array of strings in the code?
I'm a Python beginner who is starting to get familiar with the pymc library. In my program I'm generating random numbers between 1 and 100. When I'm generating random variables, it obviously returns ...
0
votes
1
answer
2k
views
How can solve pymc Python package installing?
I'm installing pymc package for python (3.7, 64-bit) on cmd windows 10 64-bit
pip install pymc
or
pip3 install pymc
but I get this error (all in red)
Using cached https://files.pythonhosted.org/...
4
votes
1
answer
342
views
PyMC3: Different predictions for identical inputs
In PyMC3, single new observations passed via set_data() are currently not handled correctly by sample_posterior_predictive(), which in such cases predicts the training data instead (see #3640). ...
0
votes
0
answers
761
views
Visualization of pymc priors
I have using pymc successfully, I believe. However, I would like to be able to visualize or plot a prior disctribution
em0 = pymc.Normal('em0',mu=emLog, tau=1./0.3, value=emLog)
where emLog is my ...
0
votes
1
answer
287
views
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 ...
0
votes
1
answer
362
views
Hierachical Bayesian Linear Regression using PyMC3 is super slow
I am trying to write some code for implementing HBM in the case of logistic regression using the adults dataset from the UCI repository.
I have already written the code, but sampling is super slow, ...
0
votes
0
answers
46
views
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 ...