What You Don’t Know About Machine Learning Could Hurt You

What you don't know about machine learning could hurt you gif

Machine Learning is one of the most current buzzword drifting across the web. It is worthy of learning about, as it is just one of the many intriguing subfields of Computer Science. So what does Machine Learning mean?

In this tutorial, I will offer you a quick introduction to the definition and some applications around the subject. Ultimately, I will present some courses of troubles that are considered Machine Learning problems. Let’s get started.

What is Machine Learning

Even among machine learning practitioners, there is no clear or well-accepted definition of what is and isn’t machine learning. Here’s an explanation I have for you.

Machine Learning is designing algorithms, from inferring what is unknown from what is known.

  • I emphasized algorithms because they can learn from data without relying on rules-based programming. Now take 5 seconds to imagine writing blocks of code to differentiate between an apple and an orange. It is impossible as you might get different fruits which look much alike in shape.
  • The word Inferring is used because it uses probability and statistics to conclude based on evidence and reasoning rather than from explicit statements.
  • Then, unknown from what is known, meaning you are given some known data, it could be the house's size, and based on what is provided, you have to answer what the price of a new home will be.

Here’s another definition of what is Machine Learning that is assumed by Arthur Samuel. According to him, 

He defined machine learning as the field of study that gives computers the ability to learn without being explicitly programmed.

Back in 1950, he wrote a checkers playing program. He wasn’t great at playing checkers.

Checkers Board
Figure 1: Checkers Board.
Source: https://bit.ly/328s7Vl

What did he do?

He had the program play tens of thousands of games against itself.

It might come as a shock to you but over time the program learned by itself what board positions tend to lead to both wins and losses, and it eventually learned to play checkers better than Arthur Samuel.

Here is another definition by an American computer scientist, Tom Michael Mitchell. He defined Machine Learning in 1998 by saying:

A computer program is said to learn from experience E to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.

Let’s relate this explanation to the checkers playing example.

  • The Experience E would be having the program play tens of thousands of games against itself.​
  • Task T would be the task of playing checkers.
  • Finally, the performance measured P will be the probability that the computer wins the next game of checkers against some new opponents.

If this still sounds confusing to you, let’s see some real-world applications.

List of Applications in Machine Learning

There is plenty of application for machine learning out in the real world, and here are a few. 

  • Email Spam filtering: You probably must have gotten an email from a crazy person trying to sell you Viagra. Today we have outstanding algorithms able to classify messages as being spam or not.
  • Google street view: When you click on the little yellow guy, it flies down, and you can look at people walking on the street. So for privacy reasons, they have to blur out people's faces and license plates.
  • Hand digits recognition: You can write a digit in handwriting and your computer is often able to recognize it.

Well, those are some use-cases of Machine Learning in the real-world. You should know there are tons of other examples in other industries such as healthcare, finance, construction, etc.

In Machine Learning, there are several learning algorithms like Supervised Learning, Unsupervised Learning and Reinforcement Learning. Let’s look into them.

Understanding Supervised Learning

In Supervised Learning, we’re going to teach these algorithms how to do something. Let’s start with an example of what “it” is and later provide you with a more formal definition.

Classification (Fruit Recognition)

Fruit Classification machine learning
Figure 2: Different Types of Fruit

For example, let’s take a fruit classification problem. We are given pictures of fruit at different positions and depths. We have somebody that will go through and say okay, this is a watermelon, that is a grape, etc.
Then, we take out the color and roundness from each of the labeled data, use those marked features, and try to find a line that separates the data.

A line that separates two different classes machine learning
Figure 3: A line that separates two different classes

We’d be mostly dealing with classification algorithms, such as support vector machines, and with all that labeled data (that’s our training set). We want to figure out what line we should draw. 

Then, if we get a new picture of fruit and see among the features we acquired and the classifier rule we have; can we know what fruit it is? What could it be?

We are using the labeled training set to then classify your data for new data points. 

Regression (Housing Price)

The price of the house based on the size machine learning
Figure 4: The price of the house based on the size

Another example would be if we want to predict housing prices. Let’s say our independent variables on the horizontal axis is the size in square feet, and our dependent variables on our vertical axis is the price ($) in 1000’s of dollars. 

A predictor line which predicts the estimates the housing price machine learning
Figure 5: A predictor line which predicts the estimates the housing price

With the given data, we want to build a predictor line that will provide us with the tools to predict the house’s size when supplied with new data. 

Estimate the price of the house size given the size in squared feet machine learning
Figure 6: Estimate the price of the house size given the size in squared feet

Let’s say 1750 square feet. We need to fit a straight line through the data and predict a price based on the house’s size. We could sell our house at around $2,000,000. 

Note that this is only one type of learning algorithm we can use. Algorithms which are better options also exist, and we will see more of these in the later tutorials. 

A formal definition for this concept is generating a function based upon assigned labels that maps inputs to desired outputs.

Understanding Unsupervised Learning

In Unsupervised Learning, we have the data, but we don’t have the labels on them. In the image, we’ve drawn labels, but this is not, in particular, the given labels. They were deduced by using a clustering algorithm. It could either be k-means clustering or Gaussian mixture models

Different dots clustered within the same group with similar properties machine learning
Figure 7: Different dots clustered within the same group with similar properties.

In this case, all we’re doing is asking, “well, is there structure at all in the data?” Is there relational associations and distances between these values that we can say “these all seem close to each other but far from other groups.”

So we can say that the blue dots are in one cluster, green dots in a second and red in a third. 

Indeed, this is a kind of Unsupervised Learning where we will have data, and we are, in general, looking for structure in the data independent of any labels. 

A formal definition for Unsupervised Learning is looking for patterns native to a dataset and modelling it like a cluster. (e.g., data mining and knowledge discovery). 

Understanding Reinforcement Learning

An agent acting within a given environment machine learning
Figure 8: An agent acting within a given environment

Finally, Reinforcement Learning is about learning the right policy of behaviors in a particular environment to get positive rewards. It is what we do when we are moving around in the world and making life choices.

An agent discovering the optimal part to reach its goal machine learning
Figure 9: An agent discovering the optimal part to reach its goal
Source: https://bit.ly/2Zka4tt

Let’s say we are going through this maze, and we get a positive reward over time, by using these different algorithms. We could then find the optimal path.

Another exciting example of Reinforcement Learning is having an AI learn to park a car in a parking lot in a 3D physics simulation.

AI Learns to Park - Deep Reinforcement Learning by Samuel Arzt

As you can see from the video, the AI starts with random behaviors. It then gradually learns to solve the task by reacting to the environment feedback accordingly. The environment tells the AI whether it is doing good or bad with positive or negative reward signals. 

A formal definition for Reinforcement Learning is that an agent would learn how to act by being given a reward (or punishment) from the world it interacts in. 

Advantages of Machine Learning Algorithms

Here are some advantages of these learning algorithms:

  • It doesn't require human intervention, giving the machines the ability to learn, make predictions and improve in the long run.
  • Since these learning algorithms can review large volumes of data, they can quickly discover specific trends and patterns that would not be feasible for humans.

Difficulties of Machine Learning Algorithms

Some disadvantages of these learning algorithms are:

  • Getting unbiased data and data of good quality takes time since these algorithms require massive datasets to learn.
  • Building a model isn't a problem; however, accurately interpreting the results generated by these algorithms is a challenging task.
  • These algorithms demand additional computing power and enough time to learn and develop to fulfill their purpose.

Conclusion

To conclude this tutorial, Machine Learning is all about making predictions. There are tons of fancy Machine Learning methods, yet the most important thing to know about them isn’t what makes them so elegant. It is that which methods fit our needs the best by using test data.

What's your own opinion about Machine Learning. Can we substitute people with Machine Learning in the upcoming years?

References

Further Reading

We have listed some useful resources below if you thirst for more reading.

Articles

Books

To be notified when this next blog post goes live, be sure to enter your email address in the form below!

Upon entering your email for new visitors, you will receive memorable infographics just for you by your email and all access to the source code used in all tutorials. Be sure to confirm to respect the privacy of everyone. 

Share

Share on facebook
Share on twitter
Share on linkedin
Share on reddit

Speak Your Mind

Leave a Reply

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

    1. You’re welcome, Raphael. In Semi-Supervised Learning, you have labels for just a small subset of your dataset. However, in Reinforcement Learning, there are no “labels”. The only form of guidance is from a reward signal that informs the Agent/AI how well it’s doing without stating what correct actions lead to its goal, as the video illustration from Samuel Arzt above.

  1. This is topical advice for my crowd, so I’ll link back to this post and you will probably get a few extra readers. It’s better than anything else I’ve seen discussing this topic. Thanks for the inspired viewpoint!

  2. I’ve been surfing online more than 3 hours today, yet I never found any
    interesting article like yours. It’s pretty worth enough
    for me. In my opinion, if all web owners and bloggers
    made good content as you did, the web will be much more useful than ever before.

About Me

David Praise Chukwuma Kalu

David Praise Chukwuma Kalu

He's an entrepreneur who loves Computer Vision and Machine Learning.

Read more about him

Get the cheatsheet I wish I had before starting my career as a

About Me

David Praise Chukwuma Kalu

David Praise Chukwuma Kalu

He's a Data Scientist and as well an entrepreneur who loves Computer Vision and Machine Learning.

Get weekly data science tips from David Praise that keeps you more informed. It's data science school in bite-sized chunks!