Machine learning for everybody
Written by David Orejuela

Machine learning for everybody

“Machine learning will automate jobs that most people thought could only be done by people.” ~Dave Waters

Machine learning term can be frightening at the start but is just a way to refer to how some piece of software can learn from their inputs to obtain the desired output, so, let's suppose that our little PC is a human kid and we are overprotective parents that want to teach that kid how to correctly climb a tree.

No hay texto alternativo para esta imagen

Our normal way to teach the kid how to climb the tree will be giving him a set of instruction so that finally the kid can perform the action of climbing the tree:

No hay texto alternativo para esta imagen
  1. If the tree is taller than 6 meters don't climb it
  2. Else, hug the tree with both of your hands
  3. Push your body towards the tree
  4. Soften your arms and use your legs to push up
  5. Repeat until you are on the top of the tree

(Don't try this I have never climbed a tree in my life) This way is the common software development flowchart, you give to the device an algorithm and it's gonna perform it step by step checking for the conditionals exactly as you have written it, the success of the kid climbing the tree is going to depend totally on how good you are with giving instructions, like a robot.

But let's say that I'm not that good climbing trees, gladly there's also other way called machine learning:

No hay texto alternativo para esta imagen


With machine learning, you don't have to tell the kid what to do in every step (That's a relief since I don't know myself how to climb a tree) the only thing you have to do is give to the kid the information about trees and eventually he'll learn to climb it correctly. The bigger the data the better the results are.

If you want the kid to be an excellent climber you will need to give him information not only about one or two trees, but thousands here comes the concept of big data (a lot of information). The more data we are using, the more accurate our kid is going to be climbing trees, have in mind that this data has to be reliable since if we are using, nonsense or blurry datasets the behavior is not gonna be the expected (big data is not a requirement for machine learning, but helps to improve the accuracy of the results).

Know we have the data, how do we teach the kid to climb the tree? There are two ways in machine learning, let's check the first one that's in supervised mode

In the first mode we tell to our machine learning algorithm what's good and bad when our kid it's approaching to the tree, so the kid is gonna start playing with the tree and whenever his height is increasing we tell the kid that he's doing good so that with time and patience he's gonna acknowledge that the movements that he does are allowing him to finally climb the tree.

The other way around is with an unsupervised technique, this means that we are not going to be overprotective this time and we are going to give our kid a lot of data about trees, but we are going to left him alone so that he can use the hidden patterns in the trees and adapt the best techniques for himself, to be a good tree climber.

No hay texto alternativo para esta imagen

Now that you know the difference between usual programming and machine learning, let's give a little more context about what is machine learning.

No hay texto alternativo para esta imagen

Let's talk first about: Artificial intelligence, whenever you can do a human task with a machine, like calculating the taxes from a spreadsheet or playing chess with you this is called artificial intelligence is the effort of giving a machine the ability to solve some task that humans could do by any mean possible, this can be achieved with usual programming (conditional-driven) or ways more data-driven like machine learning.

Machine learning is a part of artificial intelligence, but instead of having a lot of conditionals that as programmers we put to the machine, we put the data and the expected output that we want so that the machine can achieve a goal, like winning a game of chess, even without us even knowing how to play chess (Instead of giving the steps to the machine, we are giving the desired output and some rules, so that the machine will create the steps to achieve that output).

Besides from the black box that we are going to call our "model" machine learning has different categories Neural Network or deep learning is way of doing machine learning, this method learns iterative from the data, creating a lot of connections that are similar to the neurons in our brain, let's put in pause the idea of Neural Networks and let's check about how can a machine learn? Supervised learning, Unsupervised learning, Reinforcement learning, let's go around to find what they are about:

Types of learning:

No hay texto alternativo para esta imagen

Supervised learning: with this methodology of machine learning we have data that we know what's about, for example, let's say that we want to create an image recognition app, so we are gonna have a data set of images with a lot of animals, and the tag of what's the animal on the picture (we know what animal is in the picture) so we are going to serve to our algorithm a lot of animals that we know, with the answer for each picture, this way our machine can get the answer correctly from what's known. The backside of this kind of algorithm is that if we handle a picture of something new, our machine wouldn't recognize it.

No hay texto alternativo para esta imagen

Unsupervised learning: This method is good when we just have a bunch of information, but we don't really know how to group them together, our machine is going to be in charge of grouping them together by common characteristics (clusters), so that at the end if can finally learn from it and label the information for us, let's take the above example, if we serve a bunch of pictures to our animal detection app, without telling it what animals are in the photo, an unsupervised algorithm could group them by color and give them a name so that it finally starts to identify what's inside of each picture.

No hay texto alternativo para esta imagen

Reinforcement learning: This is how all humans commonly learn, in this case, a data set is not the important part for the machine, instead the machine is going to try different inputs until it gets an output that's really good for solving the problem, let's take for guess that we are trying to teach our artificial intelligence how to play tic tac toe, at first the machine is just gonna try random inputs, until by learning and experiences it's going to find the best way to resolve the exercise.

Another example is that we want to teach our machine how to drive from A to B. Let's say that we handle our machine an infinite amount of cars, each time the machine crashes a car it starts over until it learns from their mistakes and it's able to go safely from A to B.

Let's go back to our Neuronal Networks (AKA. deep learning) this is a really famous term in machine learning due to the performance it can achieve, since it can combines supervised and unsupervised algorithms, to tackle the best way to learn from data and obtain a desired output.

Ok so we know that we need a dataset and training to create a solution with machine learning but let's get a little more technical with the definitions:

Common components you need to have when applying machine learning

  1. Dataset: this is the data that we want to use to train our program, if we want to use a supervised algorithm then we also need the desired output for each data, if we want to use an unsupervised algorithm then we just need the input values.
  2. Model: This piece of software it's the little box that's able to convert the dataset (our desired input) and transform it in a desire output, here we could use a basic neural network or other kind of models known as K-means, or decision tree
  3. Cost-function or loss function: Measures how the actual data and expected output differs, so that we can have an accuracy of our model, this way we can optimize it to reduce the difference, Quadratic Cost Function are some examples Cross-Entropy Cost Function.
  4. Optimization procedure: This procedure is going to tell according to our cost-function what do we have to do to increment the accuracy of our model, Stochastic Gradient Descent .

What's really important about the previous steps, do I need to know about Stochastic Gradient Descent to apply machine learning? Gladly no, there are already a lot of techniques to apply machine learning that open for everybody, what changes for every special situation is the dataset, but creating from scratch the model, cost-function and optimization procedure is not necessary, we just need to know from the board table what function is better to apply to our dataset to gather the best result possible.

Where is machine learning used at?

Machine learning can be used everywhere from simple to complex task solving, so any field can be improved with machine learning.

  • It's been used in social networks to gather information when people are talking about certain topics and to suggest fit publicity according to their interests
  • Also, it's used for voice recognition software to have a better understanding of what the other people are saying after the training phase.
  • It also can do good tasks like filtering your mail according to dangerous or spamming e-mails to prevent faults by being updated with the latest security scam protection in real-time.
  • With machine learning, if you know the normal behavior of your machine you can even predict when it's going to fail to get the maintenance before it happens, so it can be used to save production time by analyzing the data, for example detecting anomalous vibrations in a motor to predict the date in which it will fail.

We started this blog with a curious quote from Dave Waters about machine learning saying that it could take away jobs from people, but what's special about this? This is not something bad, Machine learning can convert a really complex task into something plausible, for example recognizing signals extracted from our brain (EEG) to desired outputs to control the lightning or aspects of a house, this could be a lovely situation for people with any kind of paralysis, giving more freedom to people.

Machine learning allows algorithms to be up to date according to the most reliable source of information; since it's a data-driven solution almost every person can create something new with machine learning cause we all don't have access or see data in the same way! where would you like to see machine learning?

Cool references:

Hurwitz, J. and Kirsch, D., 2020. [online] Ibm.com. Available at: <https://www.ibm.com/downloads/cas/GB8ZMQZ3> [Accessed 5 July 2020].

Mathworks.com. 2020. What Is Machine Learning? | How It Works, Techniques & Applications. [online] Available at: <https://www.mathworks.com/discovery/machine-learning.html> [Accessed 5 July 2020].

Freecodecamp, 2020. Machine Learning Fundamentals A - Tensorflow 2.0 Course. [online] Available at: <https://www.youtube.com/watch?v=KwL1qTR5MT8&feature=emb_logo> [Accessed 5 July 2020].

Tiu, E., 2020. The ‘Ingredients’ Of Machine Learning Algorithms. [online] Medium. Available at: <https://towardsdatascience.com/the-ingredients-of-machine-learning-algorithms-4d1ca9f5ceec> [Accessed 5 July 2020].

要查看或添加评论,请登录

David Orejuela的更多文章

社区洞察

其他会员也浏览了