Blog

ProjectBlog: How actually machines learn

Blog: How actually machines learn


Photo by Alex Knight on Unsplash

Nowadays we see a lot of robots, mobile assistants, and very sophisticated artificial intelligent programs that seem to be super intelligent entities and we think they can do anything. For example, we have Sophia, which is an AI robot that has the capability to maintain conversations with humans. In my previous post, I mentioned that machines don’t learn the same way as humans do, but they have the capability to simulate this process and perform a very good job solving complex problems.

But how exactly can machines perform and archive that simulation? In this post I will talk about the basic concepts of the learning process in machines. So, if you want to understand how a machine learns you’re in the right place.

How humans learn

Before we go in deep in the “learning process” performed by machines, first I need to talk about human learning. Why? Because most of AI systems were created based on humans behavior, especially in human learning.

You probably don’t remember what you did in order to take your first steps as a baby or how was it to read something for the first time or how was your first math lesson, but in general, if you analyze those situations the process was always the same.

Human learning is based on experimentation, if we return to the example of you taking your first steps as a baby, it is very likely that the firsts couple of times you tried to walk, you failed, and not one or two of five times but many times. But one day, after a lot of effort and experience you did it! Something similar happens with machines.

If we divide the human learning process into several phases, we will discover two very important parts: the experimentation (or discovering phase), in which humans learn based on experiences (failures and successes) how to do something; and then we have the intuition phase, in which a human already knows how to do something, and uses that knowledge to act on future experiences.

I know that learning is way something way more complex than what I just explained, but as an introduction it is enough to start understanding how machines learn. So let’s dive into the topic that matters in this post, how exactly is it that machines use the human learning process to create their own learning process?

How machines learn

Similar to humans, machines use experiences to learn how to act in the future. But there is a difference, machines need you to provide the information they are going to learn from.

In humans, the experience is obtained by several situations that we experimented in our lives. But machines aren’t alive, so they can’t just go around the world learning the things they want, that is why they need us to provide the required data and to develop the process through which they are going to learn.

I’m going to explain the learning process of machine in the same two previous phases already mentioned. The first one, experimentation or discovering phase is called the Training Phase. During the Training Phase the machine receives all data known until that very moment that relates to a certain problem. For example, if we want to teach how to classify several types of flowers, we need all the information related to all flowers we want to classify, namely: flower color, sepal length, petal length, among other things. The second part (Intuition) is called Generalization Phase, during this phase, the machine uses all information provided previously to classify new elements although it hasn’t known that elements before.

Real state agent example

Photo by Scott Webb on Unsplash

To better explain these concepts, I’m going to use an example. Imagine you are a real state agent, and your work is to analyze several properties and evaluate the acceptance of futures buyers in order to decide if all the work that will be needed to sell that house is worth it. To accomplish this you have a lot of information about houses previously sold by your company and a score provided by all the people that saw that house before that house it was purchased.

For every house, you have several characteristics that describe it (Attributes), for example, you have the lot area, the number of bathrooms and bedrooms it has, garage information, neighborhood information, coordinates, etc., and you have a score (Class) associated to that information.

All information is presented to our intelligent system in something called Feature Vector, this representation is an array that covers every characteristic of our problem, and it’s related to something named Class that describes what that set of features means. In our example, we have all the house characteristics and we have a score that defines how much that house will be liked by other users based on the attributes of the other houses.

During the Training Phase, we provide the machine several records about the house information mentioned above. After the Training Phase, that if we were talking about human learning it would be the phase in which a person develops his or her intuition, the machine creates something similar, but in this case, it will store the relations between all the different characteristics combinations and the score into mathematics operations and conditions. For example, if most of the houses with more than 3 bedrooms have a score of 4, the machine will store the following rule:

If #Bedrooms ≥ 3 -> Score: 4

So if in the future a house with more than 3 bedrooms appears (Generalization Phase), the machine will predict that the house is very likely to receive very good acceptance, namely, score equals 4.

Machines only learn the information you provide

Photo by Markus Spiske on Unsplash

One of the biggest difference between human learning and the learning process in machines is that machines will only learn from the information that you showed it.

For example, suppose we have a child who has never met a dog nor a cat, and we show him some cats meanwhile, we tell him that they are actually called cats. What do you think would happen if we show him a dog? He will probably think that the dog is called a cat as well because he doesn’t know any other way to call it. This also happens with machines, they will only give answers to the information that it has already learned previously.

Footnotes

So with this post hopefully you have learned that the learning process in machines is not so different from how humans learn, and how the machines perform that simulation.

In the next post I’m going to write some practical notes about this learning process in machines, so if you’re interesting, I hope to see you in the future!

I hope you enjoyed this article and would love to read your opinions so please, share your thoughts in the comments section down below.

Source: Artificial Intelligence on Medium

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top
a

Display your work in a bold & confident manner. Sometimes it’s easy for your creativity to stand out from the crowd.

Social