Photo by Andy Kelly on Unsplash

Machine Learning, a Simple Approach for Newbies in the Matter

Jose Alonso Restrepo
The Startup
Published in
9 min readJul 5, 2020

--

Hello dear lector, this post pretends to explain ML to anyone with no background in this concept. The explanation begins from the understanding of what is machine learning (considering the different types of learning and usage cases) to what is deep learning, its differences with ML, and usage cases. Enjoy your read.

“Get the fundamentals down and the level of everything you do will rise” ~ Michael Jordan

Most of the time that we are trying to learn something, we skip some concepts that we think we know, but we don’t know. For this opportunity, I invite you as a lector to imagine that you are a grandparent or just a kid and erase every idea that you have about Machine Learning. So, let’s begin from scratch to know more about ML.

What is Machine Learning?

As usual, what is…? is the most common question that we ask ourselves, but we must go a little bit deeper. First, let’s begin by knowing when and how emerged ML? based on a Forbes article from Bernard Marr, the origins of machine learning begin in 1950 with the Turing test proposal done by Alan Turing. Who tried to determine whether a machine is intelligent or not. However, sometimes it is said that Turing’s idea is based on the Discourse of the method from Rene Descartes.

Now, what is Machine Learning? As you read above the proposal of Alan Turing, maybe you are wondering if ML is something related to giving intelligence to a machine or some stuff like that. Well, it’s a good idea. However, it is not just that. Let’s begin by describing it with an analogy. Think that machine learning is your son and that he is starting to learn any new thing. Like any other person that is beginning to learn something, he is going to get information about the concept that he is learning. And he’s going to process that information to understand all about that concept. As your son has that methodology to learn, machine learning also does.

So, ML is a subfield of artificial intelligence that uses a methodology in which it takes data or information as input, trains itself with that data, and gives an expected output to some situation related to that data. In that way, this computer science field allows machines to improve at a given task with experience. What an easy way to understand it, right? Now let’s take a look at the technical definition of ML.

Machine learning is a science that develops techniques (algorithms) to allow systems to learn automatically. By learning it means that these techniques try to identify patterns in data given as input. In this way, the algorithm can analyze the data and show an expected output depending on its training.

Ok, we know now what ML is and basically how it works. However, as well as a kid learn using different methodologies, this science also does. This subfield of AI also has different techniques of learning: supervised learning, unsupervised learning, and reinforcement learning.

Supervised learning

In simple terms, this technique tries to mimic one of the methodologies that we use to learn, which is to analyze things based on our experiences. That means that every time that we are dealing with some problem, we analyze if that problem fits with any event that we already had so that we can use the same solution that we have used before. However, issues are not always going to fit precisely with a past situation. So, we use the solution from the circumstance that is approximately more similar to the problem that we have. We can be both right or wrong using a specific solution and is in the analysis of this decision that we made that we are learning.

So, in more technical terms in the supervised learning, the data inputs provided to train the algorithm are labeled with their desired outputs. Then, the SL takes place as if it was a teacher to check whether a prediction output its good or not, and if the result is not favorable, the model it’s modified looking for better performance.

How does it works?

First of all, look at the picture below and think about every single idea that comes to mind. Now, maybe some thoughts were: tasty, cold, sour, sweet, etc. The question is, how your brain associates these ideas with that image? The key to how this methodology works is there.

Photo by Pablo Merchán Montes on Unsplash

Like we explained before, your mind is going to associate the image with past experiences. So, you can understand what the attributes of the popsicle are. And if it doesn’t find an exact fit with any situation that you already had, it’s going to take the most similar one to try to predict what is the thing in the image. In the same way in supervised learning, an algorithm could be fed data with images of popsicle labeled as sweet food. And training the algorithm on that data will lead to later identify other different popsicle images as sweet food.

In this way, SL is divided into the following types:

  • Classification problems → in which the output is a category (as the example above).
  • Regressions problems → in which the output is going to be a numerical value (predicting the price of a good based on historical information).

Usage cases

→ Speech recognition.

→ Spam detection.

→ Bioinformatics.

→ Object recognition.

Unsupervised learning

This ML technique show as another try to implement human learning methodologies in computer science. Reading Jeff Grabmeier’s post describing a study made by Ian Krajbich and Arkady Konovalov, we can find that detecting patterns is another way in which our brain learns and, take decisions. Furthermore is something that the brain is doing all the time.

Unsupervised learning leaves the teacher away from the learning process. That means that in UL, the data given as input is not labeled with responses, and the algorithm training consists of finding hidden patterns inside this data set to later give predictions based on this learning.

How does it works?

Photo by Xavi Cabrera on Unsplash

Take as an example hide and seek game that most people played in their childhood. Just remember what happens when you’re the one that is searching for the other players at the beginning of the game. Probably if you have never played in the place that you are right now, you don’t know where to begin searching. In the first seek, your brain begins looking for random places to search if there are people or not. However, in this random search, you are already processing information to find some patterns like:

  • How far the hiding place is from the “Home base” (a place where the seeker counts before going searching the other players).
  • How many people hide in the same place.
  • What are the most common places in which players hide?

In this way, your mind is saving those patterns to allow you to find people fastly. So, where learning takes place? As you would remember, after being the seeker once the next time is easier to find your friends because unconsciously you have learned thanks to pattern recognition that there are more probabilities to win the game if you search in certain places.

Like supervised learning this methodology is also divided into two types:

  • Clustering problems → in which found patterns inside a data set are used to group data items or create clusters. (classifying and image depending in certain features)
  • Association problems → in which relationships between one data item and another data item are found and implemented them such that they help you profit better. (like the example above, when you find the relationships between the hiding places and the probability to find someone there to win the game as seeker)

Usage cases

→ Anomaly detection in credit card usage.

→ Visualization (communicating information through images, graphs, diagrams, etc.)

→ Recommendation systems.

Reinforcement learning

Our last technique is a curious one methodology because what it does can be explained as a sequence of decisions or an iteration of tries and failures to find the best solution (maximum reward) for a problem. It learns from experience as we do as humans. So, whenever you are in a situation that has various decisions, and each choice has some reward, you can implement this methodology.

As training, unlike supervised and unsupervised learning, the algorithms of RL take as input an initial state of the actual situation and outputs a new one. And depending on the result, this new state receives a reward or a punishment (based on a reward policy given by the programmer). In this way, this methodology is going to output many solutions with different “scores” and finally is going to select the best one.

How does it works?

For RL, the best usage example is one of the most popular games: Chess. When the game begins, the player must select his first chess piece to move (initial state). Then, before moving it, in his brain, the player probably thinks in different strategies that may give him different rewards in terms of how many pieces he kills and how many he has left. And this repeats, again and again, each time that the player has to move a chess piece.

Photo by Vlad Sargu on Unsplash

So, for the whole game the person that is going to play, establish which is the environment (rules of the game or allow movements) and the system of rewards (example: if there is an opportunity to kill both pawn or queen, give more weight by killing the queen). While his brain takes the paper of the RL methodology, to make decisions that give him the best reward.

Types of Reinforcement

  • Positive → is when the algorithm increases the tendency that expected behavior would occur again when that behavior occurs due to an event.
  • Negativeis when the algorithm increases the tendency that expected behavior would occur again due to a negative condition that was stopped or avoided.

Usage cases

→ Industrial automation.

→ Evaluate trading strategies.

→ Game playing (tic-tac-toe, chess, etc.)

Now, after reading about different techniques and applications of ML, let’s move on to the Deep Learning subfield.

Deep Learning

Photo by Josh Riemer on Unsplash

Like machine learning mimics humans, Deep Learning also does. This subfield of ML relies on the training of Deep Artificial Neural Networks (models inspired in the human brain) using a large dataset such as images or texts. In other words, DL works with artificial brains to solve problems. Amazing right?

Well, but how a brain works to solve a problem?

The human brain is composed of billions of neurons that communicate with each other with both electrical and chemical signals so humans can catch different stimuli from the environment or have rational thinking. Now, considering that there are different types of neurons and that each type performs different actions, we can infer without going into more technical details that is in the communication of the different neurons that problems are solved. So, ANNs work by mathematically mimicking the human brain and connecting multiple “artificial” neurons in a multilayered fashion for solving problems, in other words, these Artificial Neural Networks are structures of algorithms connected to solve a problem.

Differences between DL and ML?

  • Their technique’s ability to extract features from data.
  • Machine learning uses algorithms to parse data, learn from that data, and make informed decisions based on what it has learned.
  • Deep learning structures algorithms in layers to create an “artificial neural network” that can learn and make intelligent decisions on its own.

Usage cases

→ Self-driving cars.

→ Natural Language Processing.

→ Virtual Assistants.

--

--