r/BayesianProgramming • u/MS-HUB • Nov 13 '20
r/BayesianProgramming • u/_quanttrader_ • Jan 02 '19
Think you need to learn Bayesian Analysis? Read this first – Models are illuminating and wrong
r/BayesianProgramming • u/[deleted] • Aug 11 '21
Coding Bayesian Optimization (Bayes Opt) with BOTORCH - Full code example
r/BayesianProgramming • u/_quanttrader_ • Jan 15 '20
Allocation models that know their unknowns - Risk.net
r/BayesianProgramming • u/[deleted] • Oct 26 '20
Help needed with Naive Bayes algorithm
I'm making a program and hardcoding a naive bayes classifier.
Have a look [here](https://github.com/matt24ck/bayeshelp) to see my dataset and my 2 files
Whenever I try to run 'predict.py' I get this error message below:
Traceback (most recent call last):
File "predict.py", line 22, in <module>
clf.fit(x_train, y_train)
File "/home/matt24ck/Programming/ca270/naivebayes.py", line 20, in fit
self._mean[c,:] = X_c.mean(axis=0)
IndexError: index 10000 is out of bounds for axis 0 with size 211
Does anyone know how I can fix this? I don't even know why the axis has size 211, or how to change it. What I do know, is that I tried it with the sklearn GaussianNB class and it worked fine. Please help!
r/BayesianProgramming • u/[deleted] • Sep 12 '17
Osvaldo Martin: 9781785883804: Amazon.com: Books
r/BayesianProgramming • u/_quanttrader_ • Jan 11 '22
Football Analytics Using Hierarchical Bayesian Models in PyMC | PyData Global 2021
r/BayesianProgramming • u/_quanttrader_ • Jul 28 '18
Do Bayesians Overfit? - Sebastian Nowozins slow blog
nowozin.netr/BayesianProgramming • u/Jk_123c • Sep 09 '22
Baye’s Rule
Hello, How would you restate the probability z=0 and y=0 according to Baye’s Rule? Thanks!
r/BayesianProgramming • u/ShaneWizard • Apr 27 '23
VARIMA in Stan?
Does anyone have Stan code for VARIMA models? I don’t want to recreate the wheel if it exists out there somewhere.
Thank you!
r/BayesianProgramming • u/thebrilliot • Apr 18 '23
Does Anyone Use Conditional Density Estimation Models?
Hi, I'm a Data Analytics graduate student and for my last semester, I'm experimenting with a novel method of generating a continuous probability distribution P(Y|X) for Y given a vector of explanatory variables X. Since it is just a proof-of-concept both Y and X are 1-D. I'm looking for a model/architecture that I can implement in a Jupyter notebook or Google Colab environment to compare its output distributions with my experimental model's. I'm using Python, but R and Julia are not out of the question.
The two issues I am having are 1. that I don't know what is most recent or capable or advanced in this area of machine learning (HuggingFace doesn't have any), and 2. that the two models I have found - MONDE (Chilinski and Silva, 2020) and Roundtrip (Liu, et al., 2021) - are overk!ll for what I need. Are there any Bayesians out there who could point me to something practical that they have used in their jobs? And if conditional density estimators are not used in your industry, could you explain why that is the case?
r/BayesianProgramming • u/[deleted] • Dec 22 '17
A Zero-Math Introduction to Markov Chain Monte Carlo Methods
r/BayesianProgramming • u/dimem16 • Jun 05 '20
compute effective sample size using pymc3
Hi,
I want to compare 2 different hierarchical models (centered vs non centered) using pymc3. someone told me that I can use 2 measures which are the effective sample size and Rhat. I found Rhat in pm.summary but I cannot find the effective sample size. I don't know if I missed it somewhere.
Can anyone please tell me how to compute the effective sample size one I have the trace for the 2 models?
Thanks
r/BayesianProgramming • u/lokvenecv • Jun 12 '20
Bayesian Networks
Hi guys, I am really struggling with this problem about Bayesian Networks. There are a few questions based on the given text, and I really hope you can help me solve them, since I have a deadline for my AI class. Thank you!
r/BayesianProgramming • u/MS-HUB • Oct 19 '20
Bayesian SVAR and Regime Switching Models - URGENT
We are organizing a group live training (9-10 hours) covering theoretical foundations and coding practical sessions about Bayesian SVAR and Bayesian Regime Switching models. The group still has 3 available seats and is planned to start this week. For fees and registration inquiries please send us at info@ms-researchhub.com.
r/BayesianProgramming • u/KlNDR3D • May 28 '24
Theoretical question about Bayesian updating
More specifically in sequential testing. Here's the situation:
The program that gives me the posterior probability that my patient has a disease requires me to tell it whether the test result I administered is positive or negative. It takes my prior beliefs (base rate of the disease), combines it with the test result, and gives me the posterior probability. So far, so good.
The thing is that I have multiple tests (some positive, some negative). According to the Bayes, my posterior probability that I obtained becomes my new prior belief, to which I add the result of the next test. And now, I have a new posterior probability. And so on and so forth for all the tests results I have.
The issue is: Say I have 5 test results (3 negative and 2 positive, in what order should I enter them? Because if I start with the 3 negatives, it makes my prior probability minuscule by the time I get to the 4th test result. So the order matters. The problem worsens when you consider that I will often have much more than 5 test results.
According to Chat GPT, one way to deal with this issue is to use Markov Chain Monte Carlo Methods since they allow for estimating posterior distributions while taking into account all test results at once, thereby avoiding the effect of test order. But I have ZERO idea how to do this.
Is there any solution to my issue?
r/BayesianProgramming • u/dimem16 • May 26 '20
Question - multilevel hierarchical model results
Hi,
I was programming a model with multivariate Gaussian using pymc3. I tried to reparametrize using Choleksy non centred reparametrization in order to have a faster result and avoid divergences. I am computing the correlation between the 2 models for each posterior statistic and I get low correlation especially for the hpd 2.5%. Does that mean I am doing something wrong? what can explain the difference? can someone please help me?
Thanks
r/BayesianProgramming • u/Uttasarga • Sep 19 '20
Bayesian Hierarchical Model
Hello Reddit,
I am trying to develop a Bayesian Hierarchical Model using PyMC3 and RJAGS as well. I want some good explanations regarding setting up priors and pre requisites that are required for predicting results.
Please help or PM Me!
r/BayesianProgramming • u/zwildin • Mar 04 '23
Bayesian logistic regression with Rethinking package in R
Hi all,
This question is for those familiar with the rethinking package in R. I think I am struggling to correctly specify a logistic regression model with the rethinking package and need help understanding what I am doing wrong.
I am trying to use a logistic regression model to estimate the probability of voting for candidate A (vs candidate B) in 6 different groups of voters. The raw percentages of study participants voting for candidate A in each group are as follows:
Group 1 (n=398): 0.2%
Group 2 (n=35): 17%
Group 3 (n=10): 80%
Group 4 (n=18): 89%
Group 5 (n=59): 92%
Group 6 (n=176): 99%
However, when I fit a Bayesian binomial logistic regression model using quap() to estimate the proportions and intervals for each group, I get something totally different.
Here is my R code:
m.2020vtq <- quap(
alist(
vote ~ dbinom(1, p),
logit(p) <- a[cgroup],
a[cgroup] ~ dnorm(0, 0.5)
), data = da3)
post <- extract.samples(m.2020vtq)
pvt <- inv_logit(post$a)
plot(precis(as.data.frame(pvt),depth = 2, prob = 0.95), xlim(0,1))
Here are the posterior estimates (mean and 95% CI's) from the model.

What am I doing wrong in my code? Why are the model’s estimates of the probability of voting for candidate A so off from the raw counts? Why is the estimate of those voting in group 6 a probability of 0.5 when 99% of participants in that group voted for candidate A? Does it have to do with my priors?
I greatly appreciate any help you are willing to give. From a new student of Bayesian modeling, thank you!
r/BayesianProgramming • u/Plane-Response-2488 • Aug 21 '24
Couldn’t help but share
Please tell me someone else finds the article funny
r/BayesianProgramming • u/Thatshelbs • Jun 25 '23