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
7
votes
1 answer

pymc3: hierarchical model with multiple obsesrved variables

I have a simple hierarchical model with lots of individuals for which I have small samples from a normal distribution. The means of these distributions also follow a normal distribution. import numpy as np n_individuals = 200 points_per_individual…
DanT
  • 3,960
  • 5
  • 28
  • 33
7
votes
1 answer

Rjags error message: Dimension mismatch

I'm trying to study Bayesian analysis based on book "Doing Bayesian Data Analysis: A Tutorial with R, JAGS, and Stan (2015)". In this book, there are examples. So, I'm trying to replicate this example in R. However, I have got an error message in…
kmangyo
  • 1,147
  • 1
  • 12
  • 13
7
votes
1 answer

How to set Bernoulli distribution parameters in pymc3

I have a model described in pymc3 using the following: from pymc3 import * basic_model = Model() with basic_model: # Priors for unknown model parameters alpha = Normal('alpha', mu=0, sd=10) beta = Normal('beta', mu=0, sd=10,…
recluze
  • 1,920
  • 4
  • 21
  • 34
7
votes
1 answer

Probit regression using PyMC 3

I have posted an python notebook here: http://nbviewer.ipython.org/gist/awellis/9067358 I am trying create a probit regression model using PyMC 3, using generated data to recover the known parameters (see notebook). The estimate for the intercept is…
Andrew Ellis
  • 71
  • 1
  • 6
7
votes
1 answer

R: Making sense of the output of a MCMCglmm

I performed a MCMCglmm (MCMCglmm package). Here is the summary of this model Iterations = 3001:12991 Thinning interval = 10 Sample size = 1000 DIC: 211.0108 G-structure: ~Region post.mean l-95% CI u-95% CI eff.samp Region …
Remi.b
  • 17,389
  • 28
  • 87
  • 168
7
votes
1 answer

Naive Bayes: the within-class variance in each feature of TRAINING must be positive

When trying to fit Naive Bayes: training_data = sample; % target_class = K8; # train model nb = NaiveBayes.fit(training_data, target_class); # prediction y = nb.predict(cluster3); I get an error: ??? Error using ==>…
G Gr
  • 6,030
  • 20
  • 91
  • 184
7
votes
3 answers

Simple Sentiment Analysis

It appears that the simplest, naivest way to do basic sentiment analysis is with a Bayesian classifier (confirmed by what I'm finding here on SO). Any counter-arguments or other suggestions?
miller
  • 270
  • 3
  • 7
7
votes
1 answer

Use Google Go's Goroutines To Create A Bayes Network

I have a large dataset of philosophic arguments, each of which connect to other arguments as proof or disproof of a given statement. A root statement can have many proofs and disproofs, each of which may also have proofs and disproofs. Statements…
Ajax
  • 2,465
  • 23
  • 20
6
votes
1 answer

Multinomial Naive Bayes Classifier

I have been looking for a multinomial naive Bayes classifier on CRAN, and so far all I can come up with is the binomial implementation in package e1071. Does anyone know of a package that has a multinomial Bayes classifier?
Timothy P. Jurka
  • 918
  • 1
  • 11
  • 21
6
votes
3 answers

Text Classification into Categories

I am working on a text classification problem, I am trying to classify a collection of words into category, yes there are plenty of libraries available for classification, so please dont answer if you are suggesting to use them. Let me explain what…
Ajay Jadeja
  • 101
  • 1
  • 5
6
votes
1 answer

Measuring uncertainty using MC Dropout on pytorch

I am trying to implement Bayesian CNN using Mc Dropout on Pytorch, the main idea is that by applying dropout at test time and running over many forward passes , you get predictions from a variety of different models. I’ve found an application of the…
Ka_
  • 181
  • 1
  • 2
  • 8
6
votes
1 answer

How to specify random coefficients priors in rstanarm?

Suppose I have a following formula for a mixed effects model: Performance ~ 1 + WorkingHours + Tenure + (1 + WorkingHours + Tenure || JobClass) then I can specify priors for fixed slopes and fixed intercept as: prior = normal(c(mu1,mu2),…
6
votes
1 answer

What is a good open source package for building flexible spam detection on a large Rails site?

My site is getting larger and it's starting to attract a lot of spam through various channels. The site has a lot of different types of UGC (profiles, forums, blog comments, status updates, private messages, etc, etc). I have various mitigation…
gtd
  • 16,956
  • 6
  • 49
  • 65
6
votes
2 answers

Bayesian optimization for a Light GBM Model

I am able to successfully improve the performance of my XGBoost model through Bayesian optimization, but the best I can achieve through Bayesian optimization when using Light GBM (my preferred choice) is worse than what I was able to achieve by…
xxyy
  • 109
  • 2
  • 9
6
votes
2 answers

How does MCMC help bayesian inference?

Literature says that the metropolis-hasting algorithm in MCMC is one of the most important algorithms developed last century and is revolutional. Literature also says that it is such development in MCMC that gave bayesian statistics a second birth.…
Kid_Learning_C
  • 2,605
  • 4
  • 39
  • 71