Getting Started Machine Learning

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

Pinterest LinkedIn Tumblr
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 sub-fields 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. Click To Tweet
  • 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. Click To Tweet

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. Click To Tweet

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 Click To Tweet

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? Click To Tweet

To get access to the source codes used in all of the tutorials, leave your email address in any of the page’s subscription forms.

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!

19 Comments

  1. Olukoya Raphael Reply

    Thanks alot for breaking this down.
    What is the difference between Semi-supervised learning and Reinforcement Learning?

    • David Praise Chukwuma Kalu Reply

      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.

  2. Freddy Sawatzky Reply

    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!

    • David Praise Chukwuma Kalu Reply

      Thank you very much, Freddy. It gladdens my heart to receive your feedback 😊.

  3. 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.

    • David Praise Chukwuma Kalu Reply

      Thank you very much Williemae. I’m glad you enjoyed the blog post 😊.

  4. This blog is a new view at an old problem. TY! I am sharing this!

    • David Praise Chukwuma Kalu Reply

      It certainly is. Thank you Kovalsky.

  5. I truly appreciate this post. I’ve been looking everywhere for this! Thank goodness I found it on Bing. You have made my day! Thx again

  6. Hello there! Do you use Twitter? I’d like to follow you if that would be ok. I’m absolutely enjoying your blog and look forward to new updates.

  7. Georgette Souders Reply

    Good article! We are linking to this great post on our website. Keep up the great writing.

    • David Praise Chukwuma Kalu Reply

      Thank you very much Georgette. 🙂

Write A Comment