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
8
votes
2 answers

WinBUGS Weibull Network Meta-Analysis

I am currently working on a meta-analysis of survival data across several clinical trials. To do this, I have code from a published analysis using the same methodology. However, when running this code using the data from the published analysis, I…
jrdnmdhl
  • 1,935
  • 18
  • 26
8
votes
1 answer

MCMCglmm multinomial model in R

I'm trying to create a model using the MCMCglmm package in R. The data are structured as follows, where dyad, focal, other are all random effects, predict1-2 are predictor variables, and response 1-5 are outcome variables that capture # of observed…
M.A.Kline
  • 1,697
  • 2
  • 19
  • 29
8
votes
3 answers

Loopy Belief Propagation code example

Does anybody know of a working code example of the sum-product algorithm for (loopy) belief for Bayesian Networks? I have scoured the earth for a couple days but haven't had much luck. I'm indifferent to which language it is in. All the documents I…
Gabe Johnson
  • 1,393
  • 4
  • 16
  • 28
8
votes
5 answers

Algorithms to find stuff a user would like based on other users likes

I'm thinking of writing an app to classify movies in an HTPC based on what the family members like. I don't know statistics or AI, but the stuff here looks very juicy. I wouldn't know where to start do. Here's what I want to accomplish: Compose a…
Ivan
  • 97,549
  • 17
  • 50
  • 58
8
votes
3 answers

What is a relatively simple way to determine the probability that a sentence is in English?

I have a number of strings (collections of characters) that represent sentences in different languages, say: Hello, my name is George. Das brot ist gut. ... etc. I want to assign each of them scores (from 0 .. 1) indicating the likelihood that…
sdasdadas
  • 23,917
  • 20
  • 63
  • 148
8
votes
2 answers

Handling missing attributes in Naive Bayes classifier

I am writing a Naive Bayes classifier for performing indoor room localization from WiFi signal strength. So far it is working well, but I have some questions about missing features. This occurs frequently because I use WiFi signals, and WiFi access…
stackoverflowuser2010
  • 38,621
  • 48
  • 169
  • 217
8
votes
5 answers

Naive Bayes classifier and discriminant analysis accuracy is way off

So I have two methods of classification, Discriminant analysis diaglinear classification (naive Bayes) and the pure Naive Bayes classifier implemented in matlab, there are 23 classes in the entire dataset. The first method discriminant analysis: %%…
G Gr
  • 6,030
  • 20
  • 91
  • 184
7
votes
1 answer

Implement Gaussian Naive Bayes

I'm trying to implement Gaussian Naive Bayes in C# for classification of points. I have implemented first part ( http://www.statsoft.com/textbook/naive-bayes-classifier/ ) probability part, but i don't understand how to implement Gaussian Naive…
Urmelinho
  • 1,927
  • 2
  • 14
  • 22
7
votes
3 answers

Artificial Intelligence, Text Classifier

I am new to AI. I am working an application that text classification via machine learning. The application needs to classify different parts of an HTML document. For example, most webpages have head, menu, sidebar, footer, main content, etc. I…
Milan Solanki
  • 1,207
  • 4
  • 25
  • 48
7
votes
1 answer

How to extract stan code from rstanarm object

Is there a possibility to extract the stan code used for the MCMC sampling in rstanarm? I would like to compare my own parametrisation of a model and prior choices to the one used in rstanarm.
snaut
  • 2,261
  • 18
  • 37
7
votes
0 answers

Sampling from a joint distribution in Pyro

I understand how to sample from multidimensional categorical, or multivariate normal (with dependence within each column). For example, for a multivariate categorical, this can be done as below: import pyro as p import pyro.distributions as d import…
alpaca
  • 1,211
  • 13
  • 23
7
votes
3 answers

Do variables in Bayesian Networks have to be Boolean?

I can't believe I can't find any information on this, but do variables in Bayesian Networks have to be boolean? Every example I've found in my textbook or online uses T/F variables, but how do I represent a variable that has more than two possible…
user1888863
  • 399
  • 2
  • 9
7
votes
1 answer

PYMC3 Bayesian Prediction Cones

I'm still learning PYMC3, but I cannot find anything on the following problem in the docs. Consider the Bayesian Structure Time Series (BSTS) model from this question with no seasonality. This can be modeled in PYMC3 as follows: import pymc3, numpy,…
Paul
  • 503
  • 4
  • 15
7
votes
1 answer

Is it possible to run multiple chains with JAGS on multiple cores (subdividing chains)

I’m wondering if it’s possible to subdivide 3 chains in JAGS on 5 or 6 cores, for example. Here is my code: library(parallel) # There is no progression bar using parallel jags.parallel(data = d$data, inits =…
M. Beausoleil
  • 3,141
  • 6
  • 29
  • 61
7
votes
1 answer

Cauchy prior in JAGS

I'm building a multi-level Bayesian model using rJAGS and I would like to specify a Cauchy prior for several of my parameters. Is there a way to do this in JAGS, or do I need to switch to STAN? My JAGS model is below. I'd like to replace the…
Emily
  • 825
  • 3
  • 10
  • 20