Model Comparison
In case more than one model is defined to explain the same data set the BCModelManager
can come in handy. Separate BCModel
s m1
and m2
and their prior probabilities (70 % vs 30 %) are added to the model manager via
For convenience, some of the most important methods for handling BCModel
s are forwarded to each model in the manager. For example
mgr.SetPrecision(BCEngineMCMC::kQuick);
mgr.MarginalizeAll();
is equivalent to
To do model comparison, the evidence is needed for each model, then the Bayes factors and the posterior odds are immediately available. Models are index by an unsigned
; the first model has index 0
etc.:
- See also
examples/advanced/polynomialFit