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
81
votes
10 answers

What is a better way to sort by a 5 star rating?

I'm trying to sort a bunch of products by customer ratings using a 5 star system. The site I'm setting this up for does not have a lot of ratings and continue to add new products so it will usually have a few products with a low number of ratings. I…
Vizjerai
  • 1,912
  • 1
  • 24
  • 33
36
votes
3 answers

How to provide most relevant results with Multiple Factor Weighted Sorting

I need to provide a weighted sort on 2+ factors, ordered by "relevancy". However, the factors aren't completely isolated, in that I want one or more of the factors to affect the "urgency" (weight) of the others. Example: contributed content…
drzaus
  • 24,171
  • 16
  • 142
  • 201
36
votes
2 answers

Stan. Using target += syntax

I'm starting to learn Stan. Could anyone explain when and how to use syntax such as... ? target += instead of just: y ~ normal(mu, sigma) For example in Stan manual you can find the following example. model { real ps[K]; // temp for log component…
skan
  • 7,423
  • 14
  • 59
  • 96
34
votes
4 answers

pythonic implementation of Bayesian networks for a specific application

This is why I'm asking this question: Last year I made some C++ code to compute posterior probabilities for a particular type of model (described by a Bayesian network). The model worked pretty well and some other people started to use my software.…
user
  • 7,123
  • 7
  • 48
  • 90
31
votes
3 answers

What is the difference between a Bayesian network and a naive Bayes classifier?

What is the difference between a Bayesian network and a Naive Bayes classifier? I noticed one is just implemented in Matlab as classify the other has an entire net toolbox. If you could explain in your answer which one is more likely to provide a…
G Gr
  • 6,030
  • 20
  • 91
  • 184
29
votes
1 answer

Hyperparameter optimization for Deep Learning Structures using Bayesian Optimization

I have constructed a CLDNN (Convolutional, LSTM, Deep Neural Network) structure for raw signal classification task. Each training epoch runs for about 90 seconds and the hyperparameters seems to be very difficult to optimize. I have been research…
29
votes
1 answer

PyMC: Taking advantage of sparse model structure in Adaptive Metropolis MCMC

I have a model that is structured as in this diagram: I have a population of several people (indexed 1...5 in this picture). Population parameters (A and B, but there can be more) determine the distributions for each individual's latent variable…
Danny
  • 450
  • 4
  • 10
27
votes
5 answers

Building a NetHack bot: is Bayesian Analysis a good strategy?

A friend of mine is beginning to build a NetHack bot (a bot that plays the Roguelike game: NetHack). There is a very good working bot for the similar game Angband, but it works partially because of the ease in going back to the town and always…
danieltalsky
  • 7,752
  • 5
  • 39
  • 60
23
votes
0 answers

How to incorporate weights into the likelihood of a WinBUGS model?

I want to incorporate weights into the likelihood of a WINBUGS model to do what brms does with weights. The usual BUGS approaches to accomplish that for dnorm and dpois are not working for dbin. In brms, as paul.buerkner says here, that is…
Krantz
  • 1,424
  • 1
  • 12
  • 31
22
votes
2 answers

PyMC3 Bayesian Linear Regression prediction with sklearn.datasets

I've been trying to implement Bayesian Linear Regression models using PyMC3 with REAL DATA (i.e. not from linear function + gaussian noise) from the datasets in sklearn.datasets. I chose the regression dataset with the smallest number of attributes…
O.rka
  • 29,847
  • 68
  • 194
  • 309
21
votes
5 answers

permutation & combinations interview

This is a good one because it's so counter-intuitive: Imagine an urn filled with balls, two-thirds of which are of one color and one-third of which are of another. One individual has drawn 5 balls from the urn and found that 4 are red and 1 is…
ʞɔıu
  • 47,148
  • 35
  • 106
  • 149
21
votes
1 answer

How does pymc represent the prior distribution and likelihood function?

If pymc implements the Metropolis-Hastings algorithm to come up with samples from the posterior density over the parameters of interest, then in order to decide whether to move to the next state in the markov chain it must be able to evaluate…
user18297
  • 323
  • 2
  • 7
20
votes
1 answer

What is a chain in PyMC3?

I am learning PyMC3 for Bayesian modeling. You can create a model and sample with: import pandas as pd import pymc3 as pm # obs is a DataFrame with a single column, containing # the observed values for variable height obs = pd.DataFrame(...) # we…
gc5
  • 9,468
  • 24
  • 90
  • 151
18
votes
6 answers

Bayesian spam filtering library for Python

I am looking for a Python library which does Bayesian Spam Filtering. I looked at SpamBayes and OpenBayes, but both seem to be unmaintained (I might be wrong). Can anyone suggest a good Python (or Clojure, Common Lisp, even Ruby) library which…
Baishampayan Ghose
  • 19,928
  • 10
  • 56
  • 60
17
votes
3 answers

What's the best open-source Java Bayesian spam filter library?

In other answers at Stackoverflow it's been suggested that Weka is good, but there are others (Classifier4j, jBNC, Naiban). Does anyone have actual experience with these?
Jason Cohen
  • 81,399
  • 26
  • 107
  • 114
1
2 3
99 100