Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
22 views

How to generate multiple posterior distributions under a single PyMC3 model based on multiple likelihoods and a constant prior?

Let’s say I have a dataset consisting of two subsets with binary observations. Subsets have the same proportions but different lengths. Based on a fixed Beta prior and those two binomial likelihood ...
Serdar's user avatar
  • 35
0 votes
1 answer
46 views

Pymc TypeErorr: RandomVariable.make_node() got an unexpected keyword argument 'sd'

i hope you are having a better day than i do. I am developing a project that is due within a week and the codebase that i am working on is no longer working. It was working completely fine a month ago ...
Enes Çalışkan's user avatar
0 votes
0 answers
31 views

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

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 with pm.Model() as model: X_shared = pm.Data("X_data", X) beta_0 = pm.Normal(&...
user avatar
0 votes
0 answers
50 views

Databricks notebook cell gets hung up but code completes

Have been running into an issue when running a pymc-marketing model in a Databricks notebook. The cell that fits the model gets hung up and the progress bar stops moving, however the code completes ...
Timothy Mcwilliams's user avatar
0 votes
0 answers
17 views

Do pymc distributions include a parameter similar to scipy's loc?

As a specific example, I am trying to use the Exponential distribution to model data with a lower boundary of 10. In scipy: stats.expon(scale=1,loc=10). However, I cannot find anything similar in pymc....
ghavranek's user avatar
1 vote
0 answers
42 views

How to pass deterministic variables and observtions to pymc.Metropolis()

I am trying to recreate this tutorial by Austin Rochford about Non-parametric bayesian models from 2016 which can be found here. The tutorial uses pymc3 and theano which are no longer supported and ...
terraregina's user avatar
0 votes
1 answer
22 views

MAP estimate versus Mean of Posterior Disagree

Shouldn't the MAP estimate be close to the center of the histogram of the trace samples? I see close agreement between the find_MAP estimate and the histogram of the trace variables when modeling my ...
Malcolm Slaney's user avatar
0 votes
0 answers
72 views

How can I effectively propagate parameter uncertainties from one hierarchical level to the next in Bayesian hierarchical modeling?

I am using PyMC, the probabilistic programming library of Python to implement a hierarchical bayesian model. Consider a two-level Bayesian hierarchical model. Level-1 has a parameter m1 and level-2 ...
ArKa's user avatar
  • 25
-2 votes
3 answers
2k views

I get "Getting requirements to build wheel did not run successfully" when I try to pip3 install pymc3

I need to use the module pymc3, but when I try to install it, I get the following error : error printed screen I've tried to install pymc to see if it makes a difference, but it doesn't. My python ...
Anaelle Wurm's user avatar
6 votes
1 answer
475 views

How can I solve conflict issue installing pymc3?

I've tried to install pymc3 but the dependency issue still remained. C:\Users\sykan>conda install -c conda-forge pymc3 Channels: - conda-forge - defaults Platform: win-64 Collecting package ...
kang yep sng's user avatar
0 votes
0 answers
24 views

Hierarchical bayesian interaction model specification using pymc3

I'm currently working on modeling a 2-level hierarchical Bayesian regression using pymc3 in Python. I've extensively searched for resources on Bayesian hierarchical regression, but most examples I ...
Sunghyun Bang's user avatar
0 votes
0 answers
215 views

anaconda install pymc3 & tensorflow failed

I'm setting up Python environment for my new computer, when I try to use conda install pymc3 (or tensorflow), there always have a problem when solving the environment. (base) PS C: Users lzzhu>...
Lingzhen's user avatar
0 votes
0 answers
28 views

pymc3 sampling chain 0 failed

I am trying to extract parameters for a model y=theta[0]*x+theta[1]*x**2. However when I run pymc3.sample after a short time the code crashes with an error message chain 0 failed. Any ideas how to fix ...
user5070's user avatar
  • 121
0 votes
0 answers
62 views

Fitting a 1D Gaussian using pymc

I have a 1D array that has a a signal with a peak. The peak looks like a 1D Gaussian, hence I am trying to find the x value for the signal's peak (or the mean of the fit 1D Gaussian) using pymc. Below ...
Mc Missile's user avatar
6 votes
1 answer
4k views

Attribute Error partially initialized module 'theano' has no attribute 'compile' (most likely due to a circular import)

I am importing pymc3 and theano. Using jupyter notebook, python version 3.11.5.I have installed theano 1.0.5 and pymc3 3.11.4. However when I import theano and pymc3 as below: import numpy as np ...
KS_2019's user avatar
  • 61
0 votes
0 answers
56 views

Need help in findinf optimal parameters using pymc

I have a set of measurements in the pandas dataframe, The first two columns are two parameters, and depending on their values, I also have 4 features. Let’s say I perform a new observation, and I have ...
Falco Peregrinus's user avatar
1 vote
0 answers
525 views

How can I install pymc3?

I have installed pymc3 via conda. conda create -n pm3env -c conda-forge "python=3.8" libpython mkl-service m2w64-toolchain numba python-graphviz scipy However, when I tried it in Spyder I ...
Sébastien Leveneur's user avatar
1 vote
0 answers
478 views

Bayesian framework: Plot prior predictive and posterior predictive distribution with arviz

I'm attempting to replicate the example in Figure 1.5 from this source, which illustrates the prior predictive and posterior predictive distributions. However, I'm facing difficulty comprehending what ...
JCV's user avatar
  • 505
1 vote
0 answers
33 views

PyMC: Vectorization or Fundamentally Different

is there a fundamental difference between these pymc variable definitions: r = pymc.Uniform(lower=-1, max=1, size=2) step = [pymc.Slice(var=[r])] and r1 = pymc.Uniform(lower=-1, max=1) r2 = pymc....
saintnsaints's user avatar
0 votes
1 answer
103 views

How to pass Deterministic variables to Metropolis (PyMC)?

I was trying out the examples in the book : Probabilistic-Programming-and-Bayesian-Methods-for-Hackers. Towards the end of chapter 2 I got stuck at the block of code below. It purpose is to determine ...
ranbir agarwal's user avatar
1 vote
0 answers
73 views

Pymc3, fitting a piecewise function

I am attempting to fit a piecewise function using pymc3 but am having trouble with the syntax. The current state of my code is shown in the image below, which is generating an error. Any assistance ...
J.gra's user avatar
  • 11
1 vote
0 answers
199 views

KeyError while printing trace in pymc3

I'm trying to perform the spectral unmixing technique with the MCMC algorithm. But I encountered a problem while I ran it. This is the part of the code I'm running: import pymc3 as pm import theano....
Alex's user avatar
  • 11
0 votes
1 answer
109 views

Pymc Input dimension mis-match

I am having an error in Pymc that I can't understand. I think is related to dimensions of the of a dot product (see logit_p = pm.Deterministic("logit_p", X_data * beta) ), but I double ...
Ariel Alvarez's user avatar
1 vote
0 answers
85 views

How to restrict joint combinations of parameter values in PyMC

I am building a PyMC model in which I have a multidimensional Normal distributed parameter, as follows: motor_betas = pm.Normal("motor_beta", mu=0, sigma=1/2, size=9) These betas are later ...
kakben's user avatar
  • 141
0 votes
0 answers
47 views

how to take the data type pymc3.model.TransformedRV of pymc3 as the input of scipy.special function

I am trying to use pymc3 to estimate the parameters of generalized inverse gaussian distribution (GIG), which involes the bessel function (coming from scipy.special). The inputs to the bessel function ...
shubo wu's user avatar
3 votes
0 answers
170 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, ...
Neotenic Primate's user avatar
1 vote
0 answers
71 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 ...
mihagazvoda's user avatar
  • 1,307
0 votes
1 answer
211 views

How to generate samples from distribution function of data points by PyMC3

I have a density distribution function from data, which means that I cannot express its analytical form. If I want to generate 1000 samples by this distribution function, what should I do. It seems ...
Jinning Liang's user avatar
3 votes
0 answers
585 views

Jetbrains DataSpell managed server doesn't work with the configured python interpreter (a conda environment running theano)

Jetbrains DataSpell looks almost awesome, but I'm having an issue with the managed servers that makes it just alright. I'm using a conda environment (which I've called pymc3_env for obvious reasons) ...
charrison's user avatar
  • 807
0 votes
0 answers
272 views

pymc3 chain reaching maximum tree depth

I am building a model for using comparisons between pairs of deals as input to estimate weights that define the value function of the ranking party. Maybe this sounds like gibberish, but my question ...
kakben's user avatar
  • 141
0 votes
1 answer
241 views

Vectorizing theano/aesara variable operations

I am trying to compute the function below with theano/aesara in an preferably vectorized manner: ![image|620x182](upload://9Px5wAGjZdkBXVBg4fqmuSPorPr.png) The solution i have is not vectorized and ...
steward's user avatar
0 votes
0 answers
140 views

Bayesian calibration for ode system

I tried to use the 'pymc3' package in Python to calibrate a first-order ODE system in a Bayesian way. I started with a toy ODE system first. It is dy1/dt = y2; dy2/dt = -b* y2 - c*sin(y1). b and c are ...
Janice Liu's user avatar
4 votes
0 answers
575 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 ...
generic_user's user avatar
  • 3,542
1 vote
2 answers
1k views

Cannot import PyMc3

I have installed PyMc3 but the import pymc3 as pm fails. Here is the error message: WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain` C:\Users\...
Hattori's user avatar
  • 371
1 vote
1 answer
224 views

Using custom python function within PyMC3

I want to do bayesian regression in Python using PyMC3. The regression is in the following form: y = intercept + beta*function(data, parameters) + error Where the function embeds parameters (L, P, D) ...
Matteo's user avatar
  • 137
1 vote
1 answer
1k views

How to initialize sample values in PyMC3?

I have a model with 4 priors and a custom likelihood. Everything works fine when running the sampling method with its default values and 1 chain. However, I need to change the initial values used by ...
viham1's user avatar
  • 11
0 votes
1 answer
2k views

Not able to Install Pymc3 in Jupyter Notebook

I tired to install pymc3 using 'pip install pymc3', however, after installation when I tried to import pymc3 I still got the error message : ModuleNotFoundError: No module named 'pymc3'. Below is the ...
Lucy_Blah_Blah's user avatar
0 votes
1 answer
630 views

pymc3 HDI HPD confusion

I have tried to replicate a number of examples using pymc3 and compared the results. Below is the example for estimating HPD: import pymc3 import arviz as az import numpy as np import warnings ...
Niko Gamulin's user avatar
  • 66.4k
1 vote
1 answer
1k views

Problems with theano when trying to use pymc3

I have been trying to use the pymc3 package but have constantly been receiving errors. First off, when I import the pymc3 package, here is what happens: import pymc3 as pm WARNING (theano....
Os GS's user avatar
  • 69
5 votes
1 answer
3k views

WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions

I was trying to install pymc3 with Miniconda in Windows. The installation was certainly non-trivial and took me many hours of trouble-shooting to understand what is going on. I have read many posts ...
doraemon's user avatar
  • 107
1 vote
1 answer
361 views

How to find the mean and the variance of the normal distribution obtained using the advi method in PyMC?

I am using the advi method to find the posterior distribution. How can I find the mean and the std of the normal posterior distribution that we get using the advi and not that of the samples obtained ...
imk's user avatar
  • 173
0 votes
0 answers
132 views

ValueError: Unused step method arguments: {‘initvals’} in pymc3

I am trying to use Automated Recommendation Tool which utilizes pymc3 package but I am facing issues while executing the following code cell - %%time if run_art: art = RecommendationEngine(df, **...
vaibhav mohite's user avatar
0 votes
0 answers
372 views

Error while using pymc3 and Theano-PyMC package [duplicate]

I am trying to use AutomatedRecommendationTool - A machine learning Automated Recommendation Tool for guiding synthetic biology. It uses a package named pymc3. But there are some issues regarding the ...
vaibhav mohite's user avatar
0 votes
0 answers
286 views

Stan_glm equivalent in Python

I am trying build Market Mix Modeling (MMM) using a bayesian regression. My dependent variable is "Sales_Units", and My predictors are x1, x2, x3, x4 I also have prior information for the 4 ...
user avatar
0 votes
0 answers
375 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 ...
YakultL's user avatar
0 votes
0 answers
94 views

PyMC3 fitting quadratic line to data

How do you choose quadratic model parameters? This is what I've got so far .. with pm.Model() as quad_model: #I'd like to add sigmas (and mu if that's reasonable) but I'm not sure how to decide how ...
Haley ashland's user avatar
0 votes
0 answers
333 views

Enable Nvidia GPU CUDA support for theano and PyMC3 for Windows 11

Has anyone figured out how to install GPU support for Theano and PyMC3 on Windows 11? I keep getting an error message about a DLL load failure. Here are the steps I’ve taken: Install MSVC C++ Build ...
mtc555's user avatar
  • 11
2 votes
1 answer
829 views

Error when observing on uniform with sampled parameters in PyMC

I’m new to PyMC and am trying to model a situation where you are rolling marbles at a wall and trying to find the block. The data is only for the values where the marble hits the block. I’m first ...
lovefaithswing's user avatar
-1 votes
2 answers
1k views

How can I import pymc3 in anaconda?

Thanks for helping me. I use windows 7 and want to use pymc3 in python3.7, but it doesn't work, and I get no idea. Should I install other packages or there is any solution? I have tried all that I ...
Heben cheng's user avatar
1 vote
0 answers
136 views

TypeError: Wrong number of dimensions: expected 0, got 1 with shape (6,)

I am performing a linear regression analysis using bayessian method. X = data.drop(columns='Power') Y = data['Power'] a_0=1. b_0=1. mu_0=(0.,0.,0.,0.,0.,0.) row1=[1.,0.,0.,0.,0.,0.] row2=[0.,1.,0.,0.,...
汐文燕's user avatar

1
2 3 4 5
14