Home Artificial Intelligence The Bayesian Loop

The Bayesian Loop

1
The Bayesian Loop

In the following few write-ups, we’ll explore the usually ignored superpower of modern-day recommender systems: naive models.

The Simplest Learning Algorithm

In highschool, you would possibly have encountered intriguing probability puzzles, equivalent to the Monty-Hall problem, which involved manipulating conditional probabilities. But at its core, Bayes’ formula is sort of intuitive:

  1. Do you hold a belief concerning the world?
  2. As recent evidence involves light, what are you able to do?

So, put simply, the Bayes formula is:

Belief after evidence = (Belief before evidence) * (Evidence concerning the belief)

However the clincher is, that this formula is definitely a loop! After the primary update to your belief, your belief concerning the world can rapidly change every microsecond, as recent evidence emerges.

while (belief keeps changing):
belief(t+1) = belief(t) * incoming_evidence(t)

For example: one could start with a really faulty belief concerning the world like say the earth is flat with absolute certainty. Yet if one assiduously updates their belief as recent pieces of evidence emerges like satellite images, math proofs, geometrical arguments — one gets closer and closer to the reality.

Modern-day recommender systems use these belief update loops to create among the fastest collaborative filtering algorithms. We’ll explore how this straightforward idea translates into these algorithms in the following post. But before that, let me introduce you to considered one of my delightful Bayesian pet-peeves.

A standard mistake in excel sheets

Ratios are a simple solution to compare the efficacy of a phenomenon. For instance, the number of people that replied to a proposal divided by the number of people that received the offer is an excellent solution to test the efficacy of the offer’s campaign.

Now, let’s take a look at a sample Excel sheet. Within the sheet below, we compute the reads ratio for every article as a percentage of the variety of times it was read completely. Row C seems to indicate the best engagement, almost near 80%. So, is that the perfect story?

Although the reads ratio is the best for C, it has also received the least variety of views. This implies we must always have less confidence in our estimate because we’ve had less of a possibility to update our belief.

Reads ratio to compute engagement for stories

An easy bayesian solution

What’s the common (or p50) variety of views received by all articles? Say 1000. What’s the common (or p50) variety of reads received by all articles? Say 200. These are your prior beliefs concerning the system. Now add these to your numerator and denominator and also you get: 8+200/10+1000 ~= 20%, principally the system average telling you that you just don’t really know much about this text’s efficacy.

Now let’s update the complete sheet. Now you’ll be able to see that best article is E, which might match your general statistical intuition.

Updates using beta binomial priors

Why did I select this instance? To make a degree: this common error is so prevalent that you just’ll sometimes see it twice a day across newspapers, meeting rooms, discussions, and Twitter threads. Let’s remember the purpose of the Bayesian Loop: data/evidence is just useful if we’re updating a belief, not the opposite way around.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here