I'm trying to follow this tutorial on Bayesian Model Averaging by putting it in context of machine-learning
and the notations that it generally uses (i.e.):
X_train: Training Array; dims = $(n, m)$;
y_train Target Vector; dims = $(n, )$ that you fit with the Training Array (correct values);
x: input vector of attributes for a sample; dims = $(m,)$; and
y: output prediction value; $(1,)$ scalar [scalar for simplicity] of prediction values).
These are all described below in the context of Bayesian...
.
Source describes this as a Class of models indexed by $m$: $$P(y| x,\theta, m)$$ $\theta$ : Set of model parameters;
$m$ : The model index in a set of models
.
Bayesian Model Selection:
$$P(y|x,D) = $$
$x$ : Input Data : $(n_{test}, m)$ shaped input array (rows = samples, cols = attributes);
$y$ : Output Prediction : $(n_{test},)$ length output vector of predictions based on $x$;
$D$ : Training Data : A tuple containing (i) $(n_{train}, m)$ array of (rows = samples, cols = attributes); and (ii) $(n_{train},)$ length vector containing the actual value/category described by training array
(please let me know if this is confusing and I will elaborate)
$$ = \int P(y|x,D,m)*P(m|x,D)dm$$ $$P(y|x,D,m) = \int P(y|x,\theta,m)*P(\theta|D,m)d\theta$$ $y$ and $x$ are independent of the $D$ given $\theta$
The video says that this averages over the probabilities that are predicted for each of the models. The weights that you average with are $P(m|x,D)$ posterior distributions on $m$ given $D$.
My confusion:
Can someone please describe how this is averaging over models? Do you end up with a posterior that is created with all of the models? Where does the prior go in this context?
How does integrating over all the models average them? From what I remember, integrating gives you area under the curve but in statistics I often hear the term "summing/integrating out" parameters/variables. What does that mean exactly?
Please provide a simple example so I can understand how this works :) It will definitely be useful for people trying to understand how Bayesian Model Averaging works exactly. I will put a link to this on that video because I know other people were confused as well.