MACHINE LEARNING

Marco Niño
8 min readJan 25, 2020

--

Hello again, and welcome to another Apert-… Medium story, this time we’ll talk about Machine Learning.

Machine Learning (ML) is a subfield of AI (Artificial Intelligence) science, it focuses on data structures and mathematical model construction. It’s better used when you have a lot of data and need to make decisions.

The first ideas of ML were conceived by observing and trying to replicate the way the human brain operates, especially neuron interaction; the model started in 1949 by Donald Hebb in his book The Organization of Behavior”, this book expose Hebb’s theories on neuronal behavior and communication process. In his book, Hebb wrote: “When one cell repeatedly assists in firing another, the axon of the first cell develops synaptic knobs (or enlarges them if they already exist) in contact with the soma of the second cell”. This basically means that when different neurons are activated at the same time, their connection grows stronger, on the other hand, their connection is weakened if they don’t act at the same time.

There has been a lot of confusion and misunderstandings between the concepts nowadays, normal people talk about “neural networks”, “machine learning”, “artificial intelligence” like they are one and the same, but they are quite different.

As I said before, ML is a part of AI but not all of it because AI as it was conceived by John McCarthy in 1956, is a machine capable of doing all a human can do (just more quickly), this includes things like planning, language recognition, differentiation between objects, sounds and people, gathering knowledge and applying that knowledge in problem-solving scenarios; ML it’s not able to do some of those things, for example, it does not take decisions, it just presents the results of the analysis you want to get so YOU can make the decisions yourself.

Now you may be asking yourself:

1. How does a machine learn?
2. Isn't it dangerous to give a machine the ability to learn?
3. It's possible for a machine to be smarter than a human?

The short answer:

1. Math mostly.
2. Maybe.
3. Yes but not in the same sense.

The long answer:

How does a machine learn?

Machine learning has two major approaches, those are Supervised Learning and Unsupervised Learning.

SUPERVISED LEARNING

In this method you as the one in charge of the learning, give the machine a bunch of data for it to process, let’s say for example you want to know how much time it will take to you to get from your workplace to your home and you have this variables:

A. Actual weather
B. Time of the day
C. Traffic condition
D. Different routes

The time you spend in your car away from home is dependent on all those variables.

Now, for the algorithm to work, you must have taken the data beforehand, for example

Four hours in traffic is just torture…

This is just a small random example; you may want to give your machine a lot of real data for better results.

Now you have given your machine the input data (all the variables different from the last) and the output you expect from those variables, this is the main characteristic of Supervised Learning: The computer knows the answers you seek.

Normally you will give the machine a considerable percentage of the data (I recommend around 80%) for the algorithm to learn and keep the rest for testing (you compare the result the algorithm give you vs the real value). The system’s output should have minimal difference (I usually go for 5%) for it to be acceptable.

With this ML method you can have things like future predictions on sales based in previous data, how the marked may behave in the future, etc. Take into account, no machine can make predictions on totally random events.

UNSUPERVISED LEARNING

Now is when the interesting stuff begins; imagine yourself in a totally dark room, with a lot of things you cannot see or even know what they are, and you are expected to find the connection between a light switch and a lightbulb, the thing is: you don’t even know what either of those things are!

How many computers does it take to light a lightbulb?

Unsupervised algorithms receive a lot of data, data which the computer does not know its labels, it could be anything for it so what the computer does is to try to find hidden relations or patterns inside the data, and although is not “learning” per se, methods that help the unsupervised process are really valuable.

Now, you may be asking yourself: “but strange faceless writer person, what use can I have for this method?”, well imagine you are the owner of a small supermarket, you know some of your client’s behaviors because you have and analyze your data bases, but what you may not know, for example, is that some of your female clients in their twenties prefer floral scented soap over the fruit scented ones, or that pregnant women prefer unscented soaps, with this knowledge you can rearrange certain items in your shop to increase the probability of them being bought; for example, you can put baby products near the unscented soaps, or move those soaps near to the baby products.

OTHER METHODS

There are other methods you can select for each task you need, the important thing you need to remember is:

THE MACHINE WILL ONLY LEARN ABOUT THE DATA YOU INPUT, IF YOU WANT TO KNOW ABOUT SOMETHING ELSE, YOU NEED TO FEED IT DATA ABOUT THAT SOMETHING ELSE.

What does that mean? Well it means that if you teach a computer about the behavior of your clients in “Supermarket A”, it shouldn’t be used for studying the behavior of your workers in “Production Plant A”, that’s because the machine learns about specific data, so if you want to know about “Production Plant A” you should feed its database to the machine.

The points to consider when selecting a method in machine learning usually depends on:

A. The quantity and quality of the data.
B. How much time you can wait the computer to finish (can take quite some time in some cases).
C. How urgent is the task.
D. What is that you need with the data.

You can find a nifty explanation here. Be advised: That link requires better understanding in the topic.

Now let’s look into the soul of the machine, towards the ghost in the shell: MATH.

For some people the mere word is synonym of despair and sorrow, but all you need to have are strong bases, the rest can be built on them (and as a former Math teacher I recommend you to keep a positive mind about the subject, it helps!), now Math is a really big subject, there are lots of things we need and lots we do not, so to make it “simple” this is pretty much you need to start coding your ML algorithms:

Wait, that is not basic Maths…

Linear Algebra is a wonderful part of Math, with it you can simulate systems, watch their behavior, solve some problems, create matrix and vectors, optimize systems; it really is a shame not much people is interested in it…

Probability is another misunderstood field, most of the results we get in real life, be it the state of the global market, the value of the dollar, population growth, etc. etc. etc. is studied by statistics; in ML we use topics like Combinatorics, Random Variables, Probability Distributions (these are particularly important) among others.

Now there’s Multivariable Calculus and I’m going to be honest with you, this one is difficult, even as a Math Teacher and Industrial Engineer I still have a respectful fear for this topic; it is used because real-life systems are not dependent in only one variable, the simplest industrial process for example can have at least 15 interconnecting variables in play. Proceed with caution with this one.

Algorithms and complexity are used in the understanding of your process, you need to have knowledge of how you’re going to translate your data to your machine (it’s not just throw the data and hope for the best). Also helps to keep your programs efficient, create better databases and algorithms, it’s more focused on the computational aspects of the algoritms.

Wait, what does “other” means? Well, that would be your process itself, you need to have full knowledge of your processes and all they imply to make sure your ML algorithm will be able to learn from it and give you the answers you need.

Isn’t it dangerous to give a machine the ability to learn?

First we need to understand the term “Learning”, most people understand learning as the ability to gather and modify knowledge and behaviors based on experience, that knowledge is used then to solve practical problems and create new environments to create more knowledge; normally the intelligence of a living being is measured in the capacity to solve problems, for example crows are considered one of the most intelligent species on earth:

Maybe we should be more worried about crows…

So a machine learning about a database is not really understanding the meaning of it, for the machine they are just numbers that have a connection, the same goes for facial recognition systems or even hotel robots (in spanish), they can’t go beyond their programming so they’re not really intelligent beings.

It’s it possible for a machine to be smarter than a human?

Well as we talked about later, a machine can’t be precisely “smart”, but that don’t stops them to do things humans can’t understand; for example, there was this time Facebook created a pair of AI so they could try and negotiate with each other, the result: they created their own language. Humans couldn’t understand it so they shut them down out of fear. Some of the most prominent authorities in the subject such as Stephen Hawking had expressed their fear that: “AI could end mankind”… personally I don’t see why an AI would like to do that, maybe they want to have fun? I would love to talk to an advanced AI to ask it about its outlooks on existence…

I wouldn’t worry (Author: smbc-comics)

--

--