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

brms: how do I set prior on categorical variable?

I am building a binomial regression model using 2 categorical variables. This is from an example in the book, Statistical rethinking. In the book, while using the rethinking package, we can set priors on each categorical variable as shown…
Srivatsa Srinath
  • 177
  • 2
  • 10
4
votes
2 answers

Poisson BSTS with holidays - Abort trap: 6

I'm trying to model a time series with BSTS having a Poisson response variable. However, I just get an error message. Here is a reproducible example: library(bsts) holiday.list <- list(NamedHoliday("MemorialDay"), …
Andy Carlson
  • 3,633
  • 24
  • 43
4
votes
2 answers

colaboratory will not acknowledge arviz after installation and import

In Google's colaboratory, installed arviz then did import arviz without error, but in a code cell, pm.plot_posterior(samples) gets error: arviz not installed. Trying to plot Bayesian code pm.plot_posterior(samples) I expect a plot
2tan2ten
  • 109
  • 1
  • 9
4
votes
2 answers

What is the difference between probabilistic programming vs. probabilistic machine learning?

I am trying to wrap my head around the concept of probabilistic programming but the more I read, the more I feel confused. My understanding at this point in time is that probabilistic programming is similar to Bayesian networks, just translated into…
4
votes
1 answer

Iterate over integers in Bayesian Optimization package Python

I use Bayesian Optimization package (https://github.com/fmfn/BayesianOptimization) for parameter optimization. By default this library iterate over float points number but i neet iterate over integers, how can i perform that? def…
Damir
  • 59
  • 5
4
votes
1 answer

Defining the Prior in MCMCglmm

I've found this same question posted everywhere, and I can't seem to get any of the solutions to fit to my data, and I'm wondering if I'm trying to fit my data to a model that's just too complex. I'm trying to fit my data to a multinomial logistic…
grifjo06
  • 41
  • 3
4
votes
1 answer

Specifying priors for each predictor in rstanarm

I'm developing a Bayesian regression model through rstanarm that combines multinomial, binomial, and scale predictors on a scale dependent variable. As a regular model, my model would look as it does below: ```` * deaths - scale gender -…
r_user
  • 317
  • 3
  • 11
4
votes
1 answer

pymc with observations on multiple variables

I'm using an example of linear regression from bayesian methods for hackers but having trouble expanding it to my usage. I have observations on a random variable, an assumed distribution on that random variable, and finally another assumed…
Andrew W
  • 43
  • 4
4
votes
1 answer

Bayesian Averaging in a Dataframe

I'm attempting to extract a series of Bayesian averages, based on a dataframe (by row). For example, say I have a series of (0 to 1) user ratings of candy bars, stored in a dataframe like so: User1 User2 User3 Snickers 0.01 NaN…
CaptainPlanet
  • 352
  • 2
  • 13
4
votes
1 answer

What are the losses associated with the losses property of the Bayesian layers, in TensorFlow Probability?

TensorFlow Probability layers (e.g. DenseFlipout) have a losses method (or property) which gets the "losses associated with this layer." Can someone explain what these losses are? After browsing the Flipout paper, I think the losses refer to the…
4
votes
1 answer

Not all points are within the bounds of the space error in Scikit-Optimize

I am attempting to do a hyper-parameter optimization task on a LSTM model (purly Tensorflow) using the scikit optimize package. I am using the Bayesian optimization method using Gaussian Processes (gp_minimize) for this. The demo code provided for…
Suleka_28
  • 2,761
  • 4
  • 27
  • 43
4
votes
1 answer

Running a multivariate ordered logit in PyMC3

I'm trying to build a Bayesian multivariate ordered logit model using PyMC3. I have gotten a toy multivariate logit model working based on the examples in this book. I've also gotten an ordered logistic regression model running based on the example…
Maya
  • 41
  • 3
4
votes
1 answer

bnlearn::bn.fit difference and calculation of methods "mle" and "bayes"

I try to understand the differences between the two methods bayes and mle in the bn.fit function of the package bnlearn. I know about the debate between the frequentist and the bayesian approach on understanding probabilities. On a theoretical level…
locom
  • 115
  • 9
4
votes
0 answers

Improper priors for bayesian multivariate generalized linear models in R

I am trying to run a bayesian multivariate generalized linear model with OFT1, MIS1, wt, and g.rate as the response variables, grid, collar, sex, fieldBirthDate, and trialnumber as the predictor variables, and sq_id as the random effect. My data…
Blundering Ecologist
  • 1,199
  • 2
  • 14
  • 38
4
votes
2 answers

How do I add limiting conditions when using GpyOpt?

Currently I try to minimize the function and get optimized parameters using GPyOpt. import GPy import GPyOpt from math import log def f(x): x0,x1,x2,x3,x4,x5 = x[:,0],x[:,1],x[:,2],x[:,3],x[:,4],x[:,5], f0 = 0.2 * log(x0) f1 = 0.3 *…
takak
  • 41
  • 3