Questions tagged [bayesian]

Bayesian (after Thomas Bayes) refers to methods in probability and statistics that involve quantifying uncertainty about parameter or latent variable estimates by incorporating both prior and observed information. Bayesian modeling, inference, optimization, and model comparison techniques are on topic. A programming element is expected; theoretical/methodological questions should go to https://stats.stackexchange.com.

Overview

Bayesian inference is a method of statistical inference which uses Bayes' theorem - named after Thomas Bayes (1702-1761) - to quantify the uncertainty of parameters or latent variables. The statement of Bayes' theorem in Bayesian inference is

enter image description here

Here θ represents the parameters to be inferred and d the data. P(θ|d) is the posterior probability and P(d|θ) is the likelihood function. P(θ) is the prior: a function encoding previous beliefs about θ within a model appropriate for the data. P(d) is a normalization factor.

The formula is used as an updating procedure: as more data become available, the posterior can be updated successively. In the first instance, the prior must be specified by the user. In later updates, the prior is usually chosen to be the posterior from a previous updating procedure.

References

The following threads contain lists of references:

The following journals are dedicated to research in Bayesian statistics:

Tag usage

Questions on tag should be about implementation and programming problems, not about the statistical or theoretical properties of the technique. Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

1808 questions
0
votes
1 answer

How to get the specific probability of a particular value in a distribution?

I’m a PyMC3 beginner, I started three weeks ago to familiarize myself with it and I’m doing currently a learning work so I have one doubt in my program. Sorry if it is a stupid question. I have that model: with pm.Model() as clientes: …
EduardoCabria
  • 29
  • 1
  • 4
0
votes
1 answer

Bayesin network structure learning python package for continuous variables

I have been looking for a python package for Bayesian network structure learning for continuous variables. I have been using Pomegranate, but that seems to work only for continuous variables.
0
votes
1 answer

How to randomly initialize the chains with Rjags?

I'm trying initialize the chains of the bayesian model randomly, today i do it inserting the values manually, like this: inits1 <- list("alpha" = 10, "beta" = 3.2, "lambda" = 2) inits2 <- list("alpha" = 18, "beta" = 7, "lambda" = 4.6) inits3 <-…
0
votes
1 answer

Find underlaying normal distribution of random vectors

I am trying to solve a statistics-related real world problem with Python and am looking for inputs on my ideas: I have N random vectors from a m-dimensional normal distribution. I have no information about the means and the covariance matrix of the…
FeWa
  • 141
  • 5
0
votes
0 answers

How to adapt a regression demo from library Bayesian Optimization?

I was adapting the next demo code to my own needs The demo I used to "learn". I want to change the demo code in order to study the next simple model. def model(c,I,t): return I*np.exp(-c*t) I want to fit/adjust a GP regressor to the next target…
0
votes
1 answer

Error Arviz not installed Using in Google Colab Pymc3

I want to plot using pm.traceplot(mcmc_trace,['theta']) in Google Colab but getting error: ImportError: ArviZ is not installed. In order to use plot_trace: pip install arviz NOTE: If your import is failing due to a missing package, you can manually…
Fahad
  • 128
  • 1
  • 3
  • 12
0
votes
1 answer

Bayes Factor in R with Jaggs

I am trying to decide between linear regression models using the Bayes Factor in Jaggs through R. For simplicity's sake, I am working on the mtcars dataset and the models are: (1) mpg on only intercept (2) mpg on wt (3) mpg on disp (4) mpg on wt and…
m1gnoc
  • 31
  • 1
  • 4
0
votes
1 answer

Artificial Intelligence A Modern Approach - Probabilistic Reasoning over Time

I'm currently reading Peter Norvig's Artificial Intelligence A Modern Approach Chapter 15 Probabilistic Reasoning over Time and I'm not able to follow the derivation for filtering and prediction (page 572). Given the result of filtering up to time…
0
votes
1 answer

In JAGS, how does the stochastic node works?

...and what does the ~ sign mean compared to R in y[I] ~ dnorm(m[i],tau) vs y[I] <- dnorm(n,m[i],tau)? Consider the two lines of code: `for(I in 1:length(y)) { y[i] ~ dnorm(m[i],tau) #---> Jags code (stochastic node) m[i] = alpha + beta*(x[i] -…
0
votes
1 answer

While calculating posterior using the parameter(say w_mu) vs using the parameter.data(w_mu.data) makes a difference?

I am trying to implement Bayes By Backprop. While calculating posterior if I use the parameter as an input vs parameter.data as input the result accuracy drastically changes. self.w_post = Normal(self.w_mu.data,…
0
votes
1 answer

Why does pymc3 run even when I don't include any observations?

Even when I don't include any observed values, pymc3 will still run and give me results. Is this just sampling from the prior without the likelihood? ''' import pymc3 as pm model = pm.Model() with model: # Define the prior of the parameter…
ramen_noodles
  • 53
  • 1
  • 8
0
votes
1 answer

What is causing this rjags error: dimension mismatch?

I am experiencing issues with running the following time-series JAGS model in R: data(lynx) y <- as.vector(lynx) y x <- 1:length(y) library(rjags) mod <- "model { alpha ~ dnorm(0, 0.0001) beta ~ dnorm(0, 0.0001) lambda ~ dgamma(1, 1) for…
compbiostats
  • 909
  • 7
  • 22
0
votes
2 answers

predicting p of binomial with beta prior in edward2 & tensorflow2

The following code predicts the p of the binomial distribution by using beta as prior. Somehow, sometimes, I get meaningless results (acceptance rate = 0). When I write the same logic with pymc3, I have no issue. I couldn't see what I am missing…
ndemir
  • 1,881
  • 3
  • 19
  • 25
0
votes
1 answer

Do Bayesian network inference algorithms assume specific distributions of data?

I have some data and I want to learn a Bayesian network for this data and then use this Bayesian network for inference. I use learn_struct_gs2 from the Bayes Net Toolbox in MATLAB for this purpose. By using learn_struct_gs2 a Bayesian network is…
0
votes
0 answers

Setting up a hierarchical model using R2jags

I'm working on a project for an introductory Bayesian analysis course and I'm also fairly new to using R regularly. We are supposed to build a hierarchical model using a data set we found or put together. I put a data set together to analyze the…
whgonzalez
  • 15
  • 4