Machine Learning: a digestible intro guide

in python •  5 years ago 

laptop.jpeg

This is a subject that will catch everyone’s attention. You will see an occasional Terminator reference, you might think of ‘I Robot’ or that chapter in Rick and Morty where their dog becomes super powerful with mechanic enhancements. But reality is different, in fact, machine learning is a branch of Artificial Intelligence which also gathers deep learning. In this article we will focus on ML (machine learning) but we will also shed some light on it’s brother DL (deep learning) so you can tell the difference.

Let’s get to it!

MACHINE LEARNING

machinelearning.jpeg

At its core, machine learning simply refers to the sub-field of artificial intelligence used to analyze and interpret data in order to discover patterns or something else that the programmer desires and it can be used on pretty much any specific field you can think of. To illustrate things better think of the suggestions you get from Netflix for what you might want to watch next, TikTok’s system that will always throw content at you, or heart-rate monitors that analyze your data and give you suggestions such as “It seems you’re stressed. Breathe”. All these applications come from the implementation of different machine learning algorithms that use data to reach a “conclusion” that will result in some previously programmed action. Maybe it’s not what you expected seeing so many sci-fi references but the potential here is limitless and very powerful.

Here, I will give you some of the core concepts that make ML and explain them briefly in bite sized portions.

ML is all about applying math in cool ways so basically there are two main types of machine learning algorithms: supervised learning and unsupervised learning.

Supervised Learning

These algorithms get trained by having a labeled data set fed to it, it needs to be told what to receive and what the result will be for each thing that it receives. A labeled data set is a group of data that contains both the input and the expected output; an example could be a dog training: you say “hand” (the input) the dog now extends its paw towards you (the output).

Such behavior of the supervised learning algorithm means that the more data it receives the better it will get in time. Designed to adjust itself by making predictions on the possible outcomes it is very useful to draw conclusions quickly and help people with their decision making processes like choosing which route to take home at rush hour, analyzing market prices by receiving certain attributes from the goods as input or calculating risk in a business environment where there is precedent that examples can be drawn from. As you may have noticed not all applications explicitly include numbers, how can this be? Well, there are also two main types of supervised learning algorithms to choose from: classification and regression.

Classification: this model will take an input and the output can be either “binary” (1 or 0, yes or no, true or false) or have more than two types of results which would make it “multi”. The main takeaway here is that there is always a concrete result that doesn’t necessarily always refer to a number (value). For example: the input could be “Likes pineapple pizza?” and the output could be “Yes” or “No”; if the output is “Yes” then classify the subject as “Psychopath” and if the output is “No” classify the subject as “Normal”.

Regression: this model will receive an input and always have a numeric value as the result, it’s goal is to predict as closely as possible the outcome of any given input by using quantifiable results. For example: you could use regression to calculate things related with the stock market, a highly numeric oriented field.

Now, this is the case when you know what to expect. But what happens when you don’t? Here is when the other option comes into play:

Unsupervised Learning

“Some people say, “Give the customers what they want.” But that’s not my approach. Our job is to figure out what they’re going to want before they do.” — Steve Jobs

The previous quote has relevance in case of the unsupervised learning algorithm, it works with information that is not classified or labeled and so it must find and reach its own “conclusions”. Those conclusions could be patterns or statistics that point towards a hidden result or new discoveries that could be used to classify previously unclassified material.

Basically, this algorithm will reach its own output and this output is not a concrete result. No one will tell it where to go or what to do, it will just look for the path it considers and give you a suggestion that may show you something you hadn’t noticed before. Much like Steve Jobs depicted in the quote above.

Of course, this means there are a lot more complex calculations happening here than in the supervised algorithm. Due to its nature you can imagine that it has twice the amount of work. It needs to reach a suggested result and then feedback that output to itself in order to improve the execution and start getting more solid and precise suggestions. The two main algorithms that unsupervised machine learning uses are: clustering and dimensional reduction.

Clustering: the word ‘cluster’ means a group of things that share similarities, in this case the literal meaning of the word can shed some light on the application of this algorithm. What clustering does is it will analyze the data fed to it and perform some segmentation on it based on shared commonalities. It is not 100% accurate since there could be many factors to take into account in each case but it will definitely assist in reaching a goal where classification is done properly.

Dimensional Reduction: is the method in which an unsupervised algorithm will analyze all the variables that are fed to it and will look for correlation and redundancy between them. Some times the amount of data to be analyzed is simply too large, in which case it is better and less time consuming to let an established algorithm decide which variables to into account instead of doing it by hand. The process is split in two parts that are very much self-explanatory: feature selection (this is where the data variables are analyzed) and feature extraction (this is where the data is compressed, made more manageable and time efficient).

What I just described is a sneak peek of what is really the world of ML, this was the tip of the ice-berg but the main concepts so you can understand what it is are there. Within each algorithm there are more math equations and alternatives you can use to produce more accurate results. It is important to keep in mind that this subject is basically math applied to code in order to optimize processes so here is a little of what you should know going into it:

MATH

Mathematics will give you the thought analysis you need in order to know which type of algorithm, probability, statistic or result you want to get and most importantly HOW you are going to do it. While there are several libraries and tools available to simplify these processes there is always something that needs to be done the hard way and here are some of the math subjects that are mostly used in this field:

math.png

Deep Learning (the pocket summary)

Think of the neurons in your brain: there are billions of them working together, connecting with each other to process your thoughts and memories. Now, think of the algorithms described above from the Machine Learning section. Imagine the neurons are now algorithms analyzing huge amounts of data, each feeding info to each other while filtering the data in the process. Amazing, right?
Deep Learning uses a neural network structure to analyze huge amounts of raw data that don’t necessarily need to be labeled, the program will draw its own conclusions and classify the output accordingly. It’s like machine learning on steroids.

As this HackerNoon blog explains:

"The key difference between deep learning vs machine learning stems from the way data is presented to the system. Machine learning algorithms almost always require structured data, whereas deep learning networks rely on layers of the ANN (artificial neural networks)."

Popular Technologies Used

Top Programming language:

Python: interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991. Main programming language that has risen in popularity due to its ease of use, code understandability and wide applications in machine learning and its affiliates.

Top Software:

Scikit Learn: free simple and efficient tools for machine learning and data analysis. Allows classification, regression, clustering, preprocessing, model selection and dimensionality reduction. Based in Python.
PyTorch: deep learning research platform that provides maximum flexibility and speed, replacement for NumPy to use the power of GPUs. Based in Python.
TensorFlow: open source library for numerical computation and large-scale machine learning. Developed by Google, based in Python and C++.

Based on what we have covered here you can begin to structure your mind around the basic concepts involved in Machine Learning. This could serve as a guide for you to spark your interest in the field and maybe become a mad data scientist! The possible use cases for this area are only limited by your imagination, any area could use the help of new tech to automate processes and reach faster results, this does not mean jobs will be lost though, you should think of it as jobs being improved.

I wish you the best.
S.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Congratulations @virteip! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You got your First payout

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Vote for @Steemitboard as a witness to get one more award and increased upvotes!