AI is like teenagers having sex. (Hear me out!) Everybody talks about it, everybody thinks everybody else is an expert, but nobody knows what the hell is going on. For most purposes, there is no difference between artificial intelligence and machine learning. It is a potato / potaaahto situation. The data engineers at your office probably use the term "machine learning" and the marketing team uses the term "artificial intelligence."

Yet, still, so many people talk about this. What is deep learning? What is CNN? What is RNN? We geeks never stop creating new terms. I'm getting tired of it. In this article I'm going to attempt to explain clearly what the actual differences are between these terms, while also giving you a sense of the big picture so you understand when it is important to make the distinction and when it isn't.

"If it is written in Python, it's probably machine learning. If it is written in PowerPoint, it's probably AI."

What is the difference between artificial intelligence and machine learning?

AI, machine learning, deep learning—they are all talking about the same thing. You can think of them like Russian nesting dolls. The most outer circle doll is AI. The middle doll is machine learning, and the inner core - the smallest doll in a Russian doll, is deep learning.

Artificial intelligence is a pretty general concept that refers to any digital process that takes information (which is data) and uses it to influence a decision. When that happens, it's considered AI.

Machine Learning is one method for approaching, for realizing this concept of the digital process that makes decisions based on information.

You might have heard of deep learning, as well. Deep learning is just one step deeper. It is a subset of machine learning approaching machine learning, which, remember, is a subset of AI.

The three Schools of AI

We just established that machine learning is one school of AI. Think of it like this: The whole thing, the big umbrella over everything, is AI. Below AI there are three schools. Like how at a university you will find the School of Engineering, the School of Business, and the School of Journalism. Machine learning is one of those schools. The other two schools of AI are called Frequentist and Bayesian.

Both the Bayesian and Frequentist schools are are about averaging. Let me explain a little bit more about each approach and how it differs from machine learning. To demonstrate with an example, let's use the case of polling for a national election. I don't know why that would be on my mind this week, but let's go with it.


A Frequentist approach would look like this: You have full information about the population. Let's say you have the phone number for everybody in the United States and and in one day you can call everybody and they can tell you the answer to your poll. This method would give you perfect information. You would know who is going to win the election because you have a full picture of everything.

And how do you do it? Simple math. Addition, multiplication, division—you are just getting an average. Frequentist is all about means and averaging. This approach produces results which are 100 percent correct, and it is very simple to execute.


Now, in life, you never get everybody's phone number. So, what you do instead is sampling. Sampling means, "I'm not going to be 100 percent sure, but based on the poll right now it's predicted Candidate A is 54 versus Candidate B 42 with a margin rate plus or minus 5 percent." That's the Bayesian approach. Bayesian means sampling, and using sampling to predict an outcome. This approach is usually 80 percent correct—it is based on how big your sample is.

Machine Learning

One of my favorite concepts is the idea of, rather than going from "wrong to right," going from "wrong to less wrong." Machine learning is like that. This approach usually produces only about 50 percent accuracy. That is often okay because machine learning is better suited for finding patterns in data sets, rather than making a determination about whether something is one way or the other.

With machine learning, rather than a sample, you will have a small subset of data. In this election example let's say the subset you have is just one single polling location. You poll everybody that comes into that one polling station—maybe 100 people. The machine learning approach finds patterns based on all the various data it accumulates. For example, it might find that most people who voted for Candidate A drive pick-up trucks, while most of the people who voted for Candidate B drive Priuses.

How to know which approach to use

Most of the time, people can solve something with a Frequentist or Bayesian approach. Machine learning is more of the hot buzzword these days, though, and sometimes people have only been taught about machine learning. In those cases, they're likely to default to using a machine learning approach because it's what they're most familiar with. Sometimes this turns out like trying to kill a fly with a bazooka. It's overkill.

If you don't need to make a decision and you just want to explore, don't bother with any of this and just use analytics. But if you want to make a decision, and if there's only one decision you need to make, use either Frequentist or Bayesian. If you have to make lots of multiple decisions, (such as mapping somebody's music preferences), then machine learning is the best.