Explaining the Basics of Machine Learning to Grandma

David Peralta
10 min readOct 25, 2019

--

Well actually, both of my grandmothers are not here anymore, but it is an interesting challenge trying to explain in a very easy way the complexity of Machine Learning. So I’m going to suppose you are one of them, welcome and let’s start.

First of all, What is Machine Learning? have you heard about it? what about AI (Artificial Intelligence), or Deep-learning, or Big Data? are those words the same or are correlated? don’t worry most people don’t understand either, I have heard before those words but I’m still learning about it. Sometimes there is a lot of confusion about it, I’m going to try to explain to you in this blog.

Since the beginning of mankind, we have been trying to do things more efficiently, improve our lifestyle and break technological barriers, basically because our nature is to save ‘our energy’. What does it mean? Imagine you are living in the stone age, you are hungry but the only way to eat is to go out of your cave and hunt, this was a very hard task if we compare it with going to the grocery store like you do today. Sometimes the food was not available very easy so our ancestors needed to walk long distances and take lots of risks, so they spend lots of ‘energy’ just for lunch. I’m talking about the energy we need for living, the nutrients our body use for everything, so naturally, our ancestors began to look for easier ways to make this and other tasks. Eventually, they created tools to make some things, like hunt, but more efficiently, and spending less energy.

This explains the basics of our relationship as humans with machines, you and I want that ‘stuff’ do things for ourselves, for example, we want the coffee machine does the coffee without us having to heat the water, so we can spend ‘energy’ in the things we choose. Nowadays you don’t need to hunt for your food, you can find food easily by going to the grocery store calling a cab or an uber with your cellphone, even order a delivery right to your home. Working is also very different from how it was some years ago because technology is changing the way we do things.

In a general way, you can say that if the machines we use can do more and better things for us, they have a sort of intelligence for some specific tasks. There is when ‘Machine Learning’ has sense because as the words ‘Machine Learning’ suggests, it means that is some cases we can do that Machines learn and be more intelligent. HOW?!? Let’s see.

Artificial Intelligence:

To understand this, first, let’s talk about AI (Artificial Intelligence). There are lots of definitions out there about the single concept of intelligence, so it makes very difficult to define Artificial Intelligence, but let’s keep it simple, by defining Artificial Intelligence as the ability that a machine can have to make one or more tasks logically and flexibly by processing some information of the context and taking decisions.

For example, some cars can park by themselves, so we can say that the car has a sort of Artificial Intelligence for parking.

According to some historians, the term Artificial Intelligence goes back to Allan Turing (1912–1954), who is considered as one of the fathers of Computer Science, he conceived the Turing Test which is a method that tried to demonstrate if a machine was intelligent or not. The idea was to imitate human behavior by programming a machine to give certain answers when the machine interacted with a person.
The person gives some instructions to the machine or a human being, the idea was that the person has no idea if the instructions were passed to a machine or other human and it has some response back. Turing thought that if a person could not distinguish if there was a machine or a human response the machine was intelligent.

Since the very beginning of AI, the scientist was fascinated by the idea of doing a machine intelligent, even some of them believed that machines could be more intelligent than humans, lucky for us it is not a reality jet, the scientists think it is still a matter of science fiction. But my intention is not giving a history lecture, so lest’s continue.

Now, as you can guess, Artificial Intelligence is not the same that Machine Learning, but they are correlated, actually Machine Learning is a field of Artificial Intelligence.

Machine Learning:

It is the most important field in Artificial Intelligence world, it refers to a set of techniques to give machines the ability to “learn” by using large data sets, rather than fixed program rules. So the main objective of this field is to give the machines the ability to learn, so they can have better skills in one or more tasks.

How do you do Machine Learning?
The brain is an important source of inspiration for the techniques used for Machine Learning, by understanding some aspects of the way animals and humans learn, the scientist has developed different methods of machine learning, There are three main paths or paradigms to do it:

- Supervised Learning
- Unsupervised Learning
- Reinforcement Learning

Supervised Learning:

This path is one of the most used ways to do machine learning, it has advantages and drawbacks like all other methods, in this way the developer act like a guide to the machine.
One of the ways humans learn is by taking the information from outside and classifying it, for example, if you want to teach a child what is a “cat”, generally, you point to some cat, or show an image or picture to the child and say “this is a cat”, after some time if he or she looks at another cat, even if this one is different than the one you teach him or her before, the child will know that it is a cat.

With Supervised Learning is similar, you take some data, let’s call this input (image, numbers, words, any kind of information) with the proper label and give it to the machine, also you “tell” the machine which is the expected output. So if you want to teach a machine to identify “Cats” you pass to it enough amount of images (input) with the corresponding label, until the machine can identify different cats (output). This is the basic concept, the how is a little bit complicated because the machine uses algorithms to reach the expected outcome, it has to do with mathematics and statistics, but let’s keep it simple.

Steps of Supervised Learning

“Supervised learning is the machine learning task of learning a function that maps an input to an output based on example input-output pairs. It infers a function from labeled training data consisting of a set of training examples. In supervised learning, each example is a pair consisting of an input object (typically a vector) and a desired output value (also called the supervisory signal). A supervised learning algorithm analyzes the training data and produces an inferred function, which can be used for mapping new examples. An optimal scenario will allow for the algorithm to correctly determine the class labels for unseen instances. This requires the learning algorithm to generalize from the training data to unseen situations in a “reasonable” way”
Sourse: https://en.wikipedia.org/wiki/Supervised_learning

Unsupervised Learning:

It is closely related to artificial intelligence because it gives the idea that a machine can learn to identify patterns and complex processes without the help of a human being. The output or the results of using this method are not known, you only have the input data, and the machine will reach some conclusions by using specific logic operations that the programer give.

Back to the child’s example that I give you before, with this paradigm, it would be different, in this case, let’s imagine you take the child to a place where there are dogs and cats, like an animal shelter, don’t worry you are still looking for the child integrity, but in this case you will leave the child alone and you would not give any information about the animals there. If the child looks enough time, he or she will get to the conclusion that there are two different types of “creatures”, probably won’t give them names, but in his/her mind dogs and cats would be classified as different creatures.

So this path has lots of applications, even if the output is not known, it is useful to reach conclusions, see patterns in very complex problems.

Unsupervised learning is the ability to solve complex problems using only the input data and logical algorithms, and reference data is not available.

As Supervised Learning there are different mathematical and statistical methods to do this, in this case, some of them are clustering, k-means, associations rules, etc. But I’m not going into the details.

One of the advantages of Unsupervised Learning is that the data is easier to get because you don’t need to label the input data, for example, you can have tons of images and just past them to the machine without the need of label them. One of the drawbacks is that you don’t have ways to know if the algorithms used work, because the output is not defined.

Reinforcement Learning:

This is a type of learning where the process is constantly being corrected, an easy way to understand this path is by thinking in a dog. The way humans train dogs, is by rewarding them if the dog does something we want, and punishment if don’t. The dog will make small corrections to his behavior, while the time passes the dog will improve his behavior.

So in Machine Learning, Reinforcement we define a task to be resolved and put the machine in a specific context where we can run simulations to train the machine, look at the behavior of the machine a reinforce what we want the machine to do and fix what we don’t. For example, some algorithms have been applied successfully, for learning machines to play.

So the machine starts playing, the first time is very bad at the game, but while more training it gets better.

Neural Networks:

This is the last concept I’m going to talk to you about in this blog because as you can realize now that you read the previous subjects, Machine Learning is so big and the idea is to keep this very simple.

Neural Network one of the most important techniques in the field of Machine Learning. It is called that way because when you look at the structure of the process used in this method, you can see lot’s of connections between circles, so there are lots of them, makes you think in “neurons”, please check at the next image.

It is very interesting because, in this method, we have hierarchies of information, it means the complete process is composed by layers, in which the layers use the learning process that a previous layer had, so while more layers, the output will have better learning and can reach insights of a very complex set of information data.

In the example image, you can see that there is a set of pictures as input, in each layer, there is more accuracy in facial recognition. It goes from the basic to more abstracts learning. This kind of process uses a lot of calculation resources, that is the reason why in the past, it was a hard method to use, there was a technological barrier, but as the computer is getting faster and powerful, the use of neural networks has taken a major relevance in the world.

The Neural Networks algorithms have reached a huge complexity and this is the reason why have been named Deep Learning, now you understand where this name comes from.

Conclusion:

AI is everywhere now, in almost every industry in the world, and if you have a cellphone, even if you weren’t aware of that, there is AI in your life, the future development, and possibilities are amazing, from farming to medical, going through science and education, the technology has made the life easier. All that power must be handled with responsibility because humans can do amazing applications but also bad things with technology.

We are in a world with tons of information and data, as humans, we have more data day by day, so Machine Learning is very important and relevant.

See you next time, whit love

David

--

--

No responses yet