Bayes factor

The Bayes factor is a metric used to decide between two competing models that describe a process: in our case, a predictive algorithm. I demonstrate how a Bayes factor can be used to decide whether a sophisticated algorithm outperforms a Naive algorithm that simply predicts the most common label.

Let M1 and M2 be two competing models. M1 is likely to be the model we are considering replacing M2, and a larger K indicates more evidence that M1 is the better model. If M1 denotes our predictive algorithm, a large K indicates that our algorithm does a good job of predicting the target variable.

Now recall that, in Bayesian statistics, we have a prior distribution, we collect data, and we compute a posterior distribution for an event. ...

Get Training Systems Using Python Statistical Modeling now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.