MACHINE LEARNING 101

Artificial Intelligence and Machine Learning. Are they the same thing?

The answer is NO. And I’ll tell you why.

Andrea Gaudino
The Startup

--

Photo by Comfreak on pixabay

Understanding Machine Learning is a matter of coping with modern life: intelligent virtual assistants, self-driving cars, recommender systems of your preferred streaming platform, your bank policies, the government’s plans, and maybe the statistics gathered by your nearby supermarket potentially are all examples of applications of machine learning. I hope to shed some light on this topic with this series of introductory articles. If you want to learn more, follow me through these stories.

First of all, let’s define the two terms we’re going to talk about:

  • Artificial Intelligence
  • Machine Learning

Artificial Intelligence

Artificial Intelligence (A.I.) is a skill, the ability of the machine to solve problems, behaving like a human on thinking, make decisions, interact with the environment. The studies on Artificial Intelligence aim to reach, one day, what is called the Artificial General Intelligence (A.G.I.), the ability to solve any kind of problem without human intervention.

So, when we talk about artificial intelligence in general, we’re talking about a broader field compared to Machine Learning, which is only one of the possible solutions to the A.I. paradigm. The others are far beyond the scope of this article.

Machine Learning

Machine Learning ( abbreviated ML ) is a topic in Artificial Intelligence that tries to reach the goals of A.I by mimicking the human ability to learn by experience and solve problems.

Arthur Lee Samuel, a pioneer of Artificial Intelligence, invented the term Machine Learning in 1958, giving the following definition:

Arthur Samuel — Photo by XI2085 on Wikimedia

“machine learning is a field of study that gives computers the ability to learn without being explicitly programmed”

He believed that teaching machines to play games was an excellent way to develop strategies to solve generalized problems. He then built his first self-learning application, a program able to play checkers on an IBM 701.

A game of checkers — from GIFER

A more modern definition by Tom Mitchell, a university professor at Carnegie Mellon University, in 1998, shed some light on what machine learning is:

Tom Mitchell — from Carnegie Mellon website

“machine learning is the study of computer algorithms that allow computer programs to automatically improve through experience”

This definition leads to Tom Mitchell’s description of a well-posed machine learning problem:

“A computer program is said to learn from experience E, for some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E”

This way, it’s relatively easy to identify any kind of machine learning problem. In fact, for any ML problem, we need to specify:

  • an experience
  • the task
  • a performance measure

Experience

What means experience? By definition is some kind of interaction with reality; in ML, what’s defined experience could be in the form of:

  • a bunch of data collected from previous observations of actual phenomena; this is made by classical machine learning
Example of machine learning with Neural Network — from Carnegie Mellon University
  • analyzing how the environment interacts with the machine when working on solving problems; this defines a reinforcement learning problem

Task

A task is what the program is trying to do. Classifying objects, predict some value, recommend a movie, find anomalies, etc. are all tasks, and for each task, we have to apply a different model of ML. Many times, in machine learning, it is possible to combine different solutions and applications to solve problems. Which one the best is a matter of performance.

Performance

Performance is a way to compute how good the machine learning model is at solving the given problem. Therefore, it’s necessary to apply some kind of measure or metric, mathematically significant in comparing what the goal was and what we achieved with our machine learning method.

Machine learning philosophy

Machine learning founds his concepts of an ideal relationship between a master and a follower. The master is who provides the experience, and of course, the follower is the machine. Throughout the entire learning process, the follower is always trying to guess the solution of the task, and the master is giving a mark, in the form of performance metrics. What distinguishes the various method is the kind of interaction between master and follower. So we have:

Supervised learning

The master observes the reality and gives proof of what’s going on by a bunch of observations (collected data on the phenomenon); the follower analyzes the data and tries to guess the causal relationship f between features X and the results Y. So:

Y=f(X)+ϵ

where ϵ is a mean-zero random error term independent of X. Unfortunately, the real f is unknown, so the best the follower can do is to guess, it formulating a hypothesis h(X) based on data (training set). So:

Ypred​=h(X)

And test his prediction against the data provided. If the Ypred is very “different” (in terms of a performance’s metric) from Y, the entire process restarts. It is a problem of optimization, and there are many techniques to achieve a good guess of the Y. It depends on the task to be solved. Then the resulting h(X) is tested against new data from the same phenomenon (test set) to measure the performance of the model. If it is appropriate for the problem, OK, otherwise we, as a Data Scientist, must think about different solutions or more complex models. More to come in the next stories.

In supervised learning, we have two kinds of problem:

  • regression: when we have to think of (predict) a value (i.e., the price of a house, how many sales on a product, etc.)
  • classification: when we try to guess a category for the data provided (i.e., cat or dog as in the figure above, car o bicycle, category of customers, etc.), both binary (two classes) or multiclass.

Unsupervised learning

The next step is what we do if the master is silent. We don’t have any idea about the result we want to achieve. The machine, as a follower, has only the features of the phenomenon to work on. So, the best it can do is trying to identify patterns or similarities in the data. This method is called pattern recognition.

In unsupervised learning, we have:

  • clustering: the problem here is to divide a bunch of observations in different classes or clusters, providing a recognized similarity between them. (i.e., classifying objects based on whichever is the “best” method: color, size, material, etc.)
  • anomaly detection: the machine is trying to find a pattern mismatch in the data. This way we can identify problems and react properly (i.e., fraud detectors, antispam for e-mail systems, faulty machinery detection, etc.)
  • association: analyzing the data, the follower can recognize the relationship between objects in a large database (i.e., if a customer buy the product p1 likely will also buy p2)

So far, all the methods rely on the data scientist, who:

  • choice the methodology based on personal experience and the problem
  • adapt and modify the raw data
  • tests and compares the results of different methods
  • draws conclusions on the results and transform raw data into knowledge and possibly wisdom. I mean, If you know what happens, you can take action, and this is ultimately the goal of the entire process.

In any case, the human is in charge here. We tell a very different story with reinforcement learning.

Reinforcement learning

What about be in an unknown land and try to survive traveling from point A to point B? There is no master here, and the only experience we have is what we borrow from the environment. So, we take a step or action, we see the result (feedback), and we go forward if we get good results (reward). If something wrong (penalty), we rethink our actions and try something different. Ultimately, after many tries (epochs), we reach the goal.

In the scenario, we are the follower, the machine, now called the agent, and what we have depicted is precisely the process of reinforcement learning.

A graphical representation of the reinforcement learning process — by Author

So we have the following steps:

  1. the agent takes an action
  2. the environment react to action changing his state
  3. the agent read the new state of the environment and get a feedback
  4. the agent computes the reward or penalty due to his action or actions
  5. the agent modifies the sequence of actions based on policy and rules
  6. the agent repeat from step 1 until the state is corresponding to the goal.

This way, the agent reinforces good actions and penalizes the bad ones.

What’s appealing here is that the agent can reach the goal autonomously and creatively without human intervention. Sometimes these systems bring into play solutions that humans have never thought of, and far beyond our interpretation.

Conclusions

In this article, we aimed to depict the substantial difference between the terms of Artificial Intelligence and Machine Learning. Now we are one step ahead on the path for machine learning comprehension.

Lao Zi, an ancient Chinese philosopher, once said:

Lao Zi — unknown on Wikimedia

“A journey of a thousand miles starts with a single step”

We made this single step now.

In the next story, we’ll talk about different machine learning models and how they apply to specific problems. Thank you for reading, pat yourself on the back and see you next time!

--

--

Andrea Gaudino
The Startup

Lifelong learner, machine learning enthusiast, I like to share what I know and learn something new every day.