You've got a friend with Bayes...
If you took a quick survey of math required to understand and work with AI– you'd notice some common themes:
- You need to learn linear algebra well
- You need some parts of calculus (and multivariate calculus) to understand derivatives, integration, and gradient descent
- You need to understand statistics and probability theory.
As you get into the world of probability theory, however, there are lots of perspectives you can consider for approaching data. In the book "Modeling Mindsets" by Christoph Molnar, he proposes that there are various archetypes of data scientists who view the world in distinct ways. These frames of perspective significantly influence the overall approach to resolving uncertainty. From frequentists, to likelihood, to causality, to even ML modeling itself– each view offers different strengths and weaknesses. And at some point, you will learn about Bayesian probability.
Bayes' theorem itself is pretty straightforward to understand. We hold certain beliefs in advance about how the world works, and then, with evidence, we update our understanding of actual situations to form a new set of beliefs. If you look outside right now, you might be able to form some ideas about what the weather might be in the near future. You have had experiences that suggest that if it is cloudy and dark, it could be an indicator of rain. The evidence collected is informed by prior beliefs you had, to put you in a position of estimating a future state.
From a naturalist perspective, Bayes' approach to prediction feels the most like what humans actually do. In the book "Superforecasting: The Art and Science of Prediction," individuals who excel at predicting future events are those who develop the most effective mental models, combined with a keen eye for data collection and the ability to update their beliefs accordingly. What you believe, and how you reason about what you believe, distinguish you from everyone else. Some people see that as a weakness, but I see that as a superpower.
Regardless, Bayesian approaches allow you to model situations with the sort of flexibility that I want. In my last post, I wrote a great bit about the game of mao and uncertainty. In that, I modeled several of my players to use Bayesian approaches. That is, while having a set of beliefs ahead of time and learning from data is the gist, there is still a great bit to sort out on what that means. For instance, what you think about the data itself (not just what the data itself says) becomes a moment of expressing your reasoning. If you believe that an example given to you is demonstrative of the answer, you might reason about it differently than you might if you believed it was a random sampling. If you think that the data represents a pattern intentionally, that is even further a different set of beliefs. The strong vs. weak Bayesian approaches in the agents represent exactly that sort of thinking in terms of how they trust and update their beliefs.
Another question you have to tackle is how do you pick an answer among a set of possible answers? Do you pick the one that is on the top? do you set a threshold? what happens when you have n-acceptable ideas? The min bayes player approaches this problem by selecting rules that meet a minimum set of criteria like a threshold to determine what cards to play. The max player does the opposite, and tries to select which card meets the most criteria for the given situation. What to do on ties? guess.
Not included in the game I just published, but another great opportunity for expression with Bayes, is to consider how individual actors might affect the outcomes. In the book "Bayesian Statistics the Fun Way," Will Kurt talks about the problem of data modeling and Han Solo. In particular, C3PO claims that the odds of survival are 3,270 to 1. For anyone not super familiar with probability, that means you are going to die. Yet somehow, Han pulls it off! This isn't just cinema; the calculation itself overlooks the very important fact that Han Solo is a great pilot, and when you factor that in, the odds are a whole lot less odd.
But I don't want to oversell Bayes. It is a tool that offers a flexible and rich language for modeling a problem– but I am not a purist. Depending on the problem itself, as Molnar points out, there are lots of tools in the toolbox you can pick from. But make no mistake: how you model your problem matters.