How to easy explain Machine Learning for everyone
Tags: machinelearning, python, datascience, javascript
Published: 2021-07-29 14:40:30

Did you had to explain for someone what is a Machine Learning (ML) ? For your boss, investor, friend, family or anyone ? I think everybody who use ML at the work had to explain it. Sometimes it is hard because some people doen't know math or statistics very well ( and some other doesn't even know what it is). When I have to explain it I always try to understand who will listem, because if I was talking with my boss, he know something of math, and I can say things like 'function' or 'variable'. But when I'm talking with my friends, they don't even know what is it (sometimes they said that they are understaning, but I know that is a lie haha). This article is a methodoly that I develop to explain what is ML for everyone, without technical words or math language. I hope you can use it as much as I.

## First things first

Let me introduce you the meaning of learning. When we said: 'The machine is really think on that' it is the same of 'The machine is making some calcs'. I know that this may act like something hard to understand, but everybody make calc when we are trying to think. Let me show you.

If I need to know what is the best way to go from here to the nearest starbucks. Our mind start thinking in: How much time it gonna take if I choose the A way, B way or even C way? Or other one will think: How much miles (or kilometers) do I will need to walk if I take A way, B way or C way? Look all those questions made you think in 'How much', but you can also think: What the way is more secure to go. But how we can measure securty ? The number of robers in the neighborhood ? The number of cars in the street ? The ammount of people transit in it on a day ? Even your qualitative question can be coverted at a quantitative one. And that is the beauty of thinking.

![3-ways](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e9sub5829lr6enrtpw12.jpg)

When we are trying to learning something we are simulating possibilities of doing something based on our own tests. We know that the way B is more short than way C, but way C in some hours of the day is not secure, so we can choose the way B instead of way C. Look, we are interpreting our data with our observations and learn with it. I know you had have to walk into all of theses ways to know the better choose.

Machine will do the same as you did. But it will use math to understand the best choose. And it can use a lot of thinking types to choose the best. As you can prefer doing something because of something, the machine can think in a way different from the other one. We call it algorithm, and the data we are using to choose we call it features (or you can call it variables).

## How we can predict something ?

Now we understand what is learning in terms of thinking, how we can predict the future ?

As we see at the top, we need to produce our observations based on our life. Machine can do the same to predict the future, but you need to give data for it. Machines can use the data from the past to understand better how the future will be.

![baby-steps](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi89rquohk241qkh40d8.jpg)

Imagine now that you start work in a new job, and don't know the better way to fo there. You need to start going there without any perceptions. After 10 times going to work, you can choose a better way, because you have data to understand what is the better. After 100 times, you may have a solid thinking in what is the better, and will choose always the right way.

Machines will do the same. You can pass 10 observations and it will predict something, but when more and more data is passed, it can predict better. If you want to see them act by itself you can just pass sensors and say, go from A to B. It will start make your own observations, and you just need to say if it made a good or bad decisions.

Look we now have 2 types os act. You can teach a machine passing data to it from the past, or you can just say if it made a good choice. This is called supervised and unsupervised methods.

But how it can create the rules ? Lets imagine a configurable engine that make fruit juice. You can configure it to make orange juice pressing some buttons, insert the oranges into it and you will have orange juice at the final step. If you want mango juice, you need to set other configurations, input mango and it will produce mango juice. 

![orange-juice](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ta01b4qrck6wdfrcrx11.png)

Now you want papaya juice, but we don't now how to set the configuration. You will start pressing some buttons trying to create the correct configuration to do it. Now you are learning how to use this engine to produce papaya juice.

![papaya-juice](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ivll32qgom4kdjko4l7l.png)

Ordinary functions act like the first exemple. We have data, and the rules and it produce a result to us. In the other hands, ML will need only the data and the result, and it will output the rules to do it. So if you pass papaya and papaya juice to the engine with ML, it will produce a configuration to make papaya juice to you. Now you can get this configuration and the data, put it into the engine without ML to start produce you papaya juice.

![papaya-juice-rules](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/95do2i9ctnodlyqlh4hg.png)

And that is wonderful. You can use ML to learn the rules of doing something, and with this rules in your hands, you can replicate it to predict the future.

## Conclusion

I know that this method is not accurate as expected, but for me it is working better than when I show graphs, functions, methods and all the boring stuffs for ordinary peoples. You can adapt it to your own observations, because after all, we are juice engines adapting our configurations to do the better fruit juice.

Some people will start make some questions like: What you do when something occur ? What I need to start undersand better it ? How much time you studied to learn it ? And such others. In that case I advise you to try to explain with your own words and try to not scare them haha. Maybe they are thinking in learn more and you can be their teacher. Good luck and comment if you have any others ideas to explain better what ML is.