Machine Learning

How does Machine Learning work? And how to Learn it

Machine LearningAI, Machine Learning and Deep Learning are terms you often hear these days. You are using these technologies every day. Big companies like Google, Netflix, Amazon, and Facebook are using machine learning extensively to deliver quality products.

How does machine learning work? Machine Learning is the ability for computers to learn as a human does. This means the system isn’t explicitly programmed to do a task but rather the system learns and refines from external inputs over time. These inputs are large datasets which will make the machines smarter over time.

In this post, we will dive deeper into details on how machine learning works. We will also answer questions like: What is machine learning? Is machine learning the same as artificial intelligence? What about neural networks and deep learning?

What is machine learning?

Machine learning is a program which can learn over time. In typical computer programs, the developer writes code with detailed step by step instructions.

I will demonstrate with an example of what machine learning is.

Arthur Samuel is considered the father of machine learning. He coined the term in 1959. He was trying to create a program which could beat him in chess.

In chess, there are billions of possibilities after only a few moves. It would be impossible to program it with step by step instructions because you need to consider how the chess pieces are located on the board.

Advanced chess players have learned from historical matches on which moves are better in multiple different situations. This is how they reach their level of expertise.

Arthur Samuels program essentially did the same thing. The program played thousands of times against itself and learned from its mistake. In the mid-70s, the program was good enough to challenge highly skilled amateur players.

How do machines learn?

Machine learns by receiving a huge amount of data. The machine will sort through this data and try to recognize patterns. When it sees enough patterns the computer can start to give predictions. These predictions can be correct or false.

If you constantly feed the computer with more data, it will be smarter for each iteration and more and more of the predictions will turn out correct.

Supervised Learning

Supervised Learning
In supervised learning, we have already an idea on what the output should be.

For example, if we want a system to recognize pictures of cars. I way to do it is to label a big number of images which has a car. The system will then learn from these images and develop a pattern where it can recognize cars in future images.

There are two kinds of common methods to supervised learning. Classification and regression. Classification is about labeling data, while regression is predicting trends using the input data the system has consumed.

It is because we label the input data we call it supervised.

An example of supervised learning is detecting street signs. If we program a system for detecting street signs, we can feed the system with multiple images where we label those with the different signs we find in traffic.

With enough data, the system will be smart enough to recognize the sign and act accordingly.

Unsupervised Learning

Unsupervised LearningIn unsupervised learning, we are not labeling input data. On the other hand, we are feeding the system with unlabeled data. The system must then draw conclusions based on this data,

Since we have little or no information about the input data or the outcome we expect, the algorithms are more complex. It has also fever tests for determining if the algorithm is performing correctly since we have less control of the information.

Unsupervised learning uses a method called clustering. This is about finding patterns and groupings from unlabeled data.

Examples of Machine Learning algorithms

Like I said earlier, there are a lot of well-known machine learning algorithms we use every day. To get a better understanding of how machine learning work, we should go through some examples on MI technology which are in use today:

Image Recognition

For us humans, recognizing a number or a cat in an image are easy. However, for machines, it is not that simple.

Let’s take an image of a cat. We humans can easily see if an image is of a cat or not. Why? Because we have learned while growing up what kind of features a cat has.

Since pictures of cats can have different angles, quality or backgrounds, it is hard to develop a program for detecting cats, since it is difficult to program it explicitly.

This is why we have to attack the problem in a different angle. We need to make the program learn to detect cats. This is where machine learning comes in.

If we then feed the system with a lot of pictures labeled as cats, it can scan the pixels and find patterns which are common for cats.

Online Search

Some of the most well-known use of machine learning is Google’s search algorithm. This algorithm is constantly improving the search results from the user’s input.

For every search you make, the program observes how you are interacting with the search result. If you click on the number one result and stays on that page for a while, then Google assumes that you have found what you have been looking for. Therefore there is no reason for Google to place that website lower in the search result.

If you, on the other hand, clicked on another result further down the page or even clicked on the first result, went back to the search page immediately and clicked on another page. Then Google will think the first result wasn’t what the user was looking for and might correct itself accordingly.

Google Assistant

Google Assistant is a digital personal assistant where you can ask it for facts, remember appointments, play music, and much much more.

The assistant is powered be AI and machine learning engine. It taps into Google’s knowledge graph to answer questions from the users.

At I/O 2018, Google announced Google Duplex. It takes Google Assistant to a new level. For instance, it has the capacity to handle an interaction with other people smoothly. It will have realistic voices modeling from people like John Legend. It can even give you positive reinforcements if you are polite to it.

With Google Duplex you can give your digital assistant task like making an appointment to the hairdresser. Check this youtube video for a cool example.

Google Maps

google mapsThere are a lot of machine learning features in Google Maps. It gathers traffic information from users, and you can see in real time if there is a lot of traffic in your route. If you are using navigation, it can find a faster and less trafficked route.

It also can do things like determining where it is most likely to find parking. How this is possible is, like machine learning in general, gather tons of data. If a user is driving around in circles after reaching their destination, it is most likely that the person has difficulty finding a parking spot. Google might then flag that it is difficult to find parking spots in that location at that time.

Self-driving cars

This is coming much sooner than I anticipated. There are already cars today which has driven thousands of miles with great results. There is, of course, more testing needed for this to be released full-scale on the public. But self-driving cars are performing very good and it seems this will be the reality in the near future.


Netflix earns money by having monthly subscribers. It is therefore important for them to keep the users at their platform. And what are some of the ways for them to achieve that? By recommending you the next binge-series you can consume of course.

With their recommendation engine, they can go through the data like your watching history and liked series/movies. That way the system can get an idea what kind of taste you have and recommend shows you most likely will appreciate.


If you have Snapchat, you might have noticed their facial filters. This is where you can add bunny ears on your head or having a rainbow coming out of your mouth.

This is called Lenses and came out in 2015. It can do this by tracking facial movements. The technology can add the effect to your face while your head is moving.

This is a technology from a company called Looksery which Snapchat acquired in 2015.

Spam mail

If you look in your spam folder, you will likely see a bunch of mails ranging from giant lottery winnings, pills that will solve all your problem, etc.

How does an email provider like Gmail filter these emails?

The filter will look at things like blacklisted known spammers, headers, grammar, spelling mistakes, phrases and much more. With all these things into account, the filter will classify it as spam or not.

This filter will be better with time. It will recognize what kinds of mail users mark as spam, and the filter will take that into account when deciding to classify spam in the future.

However, spam filters aren’t perfect. Spammers will try to bypass these filters by including legitimate text in the mail and renaming typical spammy words to something else.

The filter can’t be too strict either. It is much better to let through a couple of spam emails in the inbox, rather than get the legitimate mail in the spam folder. People are rarely going through their spam folder. When that happens, it is a good chance that the email will never be read.

What is the difference between Artificial Intelligence and Machine Learning?

AI and machine learning are buzzwords which a lot of people think is the same thing. But there are some differences between the two.

Artificial Intelligence is when a machine is doing things which are typical for human intelligence. These are things like understanding what is in an image, understand speech, solve problems, etc.

Machine Learning is when a program or machine can learn by itself.

If we take the Chess program which Arthur Samuel created as an example. It would be possible to create an AI chess opponent where all the moves are explicitly coded, without any learning mechanism. It would still be considered an AI, but the program doesn’t use machine learning to create the AI opponent.

So to conclude, Machine Learning is a method for creating AI. But it is not necessary for AI creation.

What is the difference between Deep Learning and Machine Learning?

Deep learning is a subset of machine learning. It has the same characteristics of machine learning in the way that deep learning also can learn to be better.

A deep learning algorithm is always analyzing data. The model is designed to use logic and draw conclusions in the same way as a human mind would. To achieve this it uses an artificial neural network. This is inspired by the biological neural network of the human brain.

How do you learn Machine Learning?

Now you know how machine learning works and the difference between AI and deep learning.

If you are a developer like me, you might be thinking how awesome it would be to create some machine learning software on your own. Well, let’s take a look at how you can do that.

Why learn machine learning?

Ai, machine learning, and deep learning. These are the cutting edge technology today. Which makes it extremely cool :).

People are embracing these technologies with products like Apple’s Siri and Google Assistant. Amazon and Netflix are using machine learning to predict what kind of movies/products you would be interested in.

Now self-driving cars are emerging, showing results of being more predictable and safe than human drivers.

Suffice to say, these are exciting times. AI and machine learning are concepts which have been around for several decades, but it hasn’t been possible to handle the amount of data with the technologies we’ve had. Until now!

We are in the beginning stages of an AI revolution. With this technology, we will be able to achieve things with computers which we never have before in human history.

Machine learning engineers also have a high salary. According to Glassdoor, an average salary is $115,000 per year.


You need a strong math foundation to be able to excel in machine learning. There is no way around it.

To begin learning, you need to have some knowledge about the following:

  • Basic programming skills.
  • Linear algebra.
  • Statistics and probability theory.
  • Calculus.
  • Graph Theory.
  • Optimization methods.

Learn Python

Python is currently the king of machine learning. A few years ago, R was the most popular choice.

KDnuggets had a poll with over 2300 voters which shows the popularity of programming languages for machine learning development.

MI tools

Python is a popular choice for machine learning developers because they have excellent libraries for machine learning, and it is a simple programming language to learn.

To learn Python, check out this course on Udemy: Complete Python Bootcamp: Go from zero to hero in Python 3. This is a comprehensive, but yet a simple straightforward course. You can follow this course easily, even if you just have a little programming experience.

Tools and resources

On your journey in learning machine learning, you should check out the site Kaggle. This is the largest community in the world for machine learners and data scientists. They are arranging machine learning competitions where thousands of machine learners are competing to create the best algorithms.

Kaggle has a cloud-based workbench for data scientists to share code and datasets. They have courses for you to learn machine learning and job boards for employers to post job offers. Kaggle was acquired by Google in 2017.

One of the most well-known and praised courses of machine learning is Courseras five courses on Deep Learning Specialization. Here you will learn the foundations of deep learning. You will work with case studies in different fields and practice them in Python and Tensorflow.

You can also check out Data Science, Deep Learning, & Machine Learning with Python which is a course on Udemy.

What is the future of Machine Learning?

robotRight now we are just scratching the surface of machine learning. There are multiple fields where machine learning is going to revolutionize the business.

Self-driving cars

Driverless cars are something that is already in use on regular streets today. It shows great promise. With advanced radars and cameras, it can read signs, spot pedestrians and other elements in traffic.

Machines don’t ever get tired. They won’t have road rage and other ego issues. It is often the human element which causes thousands of people getting killed in traffic every year. With this technology, the industry is hoping to bring this count close to zero.

The technology used in self-driving cars is a mix of machine learning and deep learning. Deep learning is used for its effectiveness. There is usually some machine learning algorithm working as well for some processing tasks and to make sure the deep learning model doesn’t go astray.

Medical advancement

  • Medical image diagnostics. Computer vision is one of the breakthrough of machine learning in the medical field. With the possibility to scan pictures, it can learn to watch out for different health issues.
  • Autonomous Robotic surgery. Today we have a robot called “da Vinci”. Surgeons can use this robot for steady and detailed surgeon work. This robot is mostly operated by experienced surgeons. It has some machine learning like computer vision to measure distances. But imagine if it can be autonomous with the help of machine learning. You can feed them tons of data about a certain operation, and it can learn to be better than any human surgeon.
  • Epidemic outbreak detection. We have so much data available today, like satellite images, social media, historical internet data and much more. It is impossible for humans to process everything. This is where machine learning shines. Machine learning has been used for predict malaria outbreak.

Computers will talk like humans

The company Deepmind which is owned by Google has created a deep neural network which generates natural sounding human speech. This is called Wavenet.

Check out the difference with Wavenet vs non-wavenet on this page. With the new Google Assistant, there will be released several voices, among them the voice of the musician John Legend. Using wavenet’s algorithm, it can simulate entire vocabularies without many human recordings.

With these capabilities, it can also translate languages with what you say in real-time and play those translations with your own voice.

By the way, Deepmind is the company behind the AlphaGo AI, featured in the movie AlphaGo. This is a movie about creating an AI for the complex game of go, where the AI is playing against the best go-player in the world. The movie is very interesting and worth checking out.


So why are AI and machine learning so popular right now?

The answer is two-fold. We are living in the information age. We can communicate all over the worlds and all the knowledge in books are digitally scanned.

According to a paper about marketing trends published by IBM, 90% of all the information on the internet has been created since 2016. We are over 4 billion users on the Internet with a lot of people using social media every day.

This means it is a vast amount of data out there. With intelligent systems we can process this data in ways we don’t even understand yet.

Another reason machine learning is hot and trendy is that we now have the processing power and storage to consume this data. The computers available today is on another level than what we had 10-20 years ago.

In other words, these are exciting times. Who knows what the future will bring, but it is a little scary as well. When Elon Musk is worried about the future of AI, then, to be honest, I get a little worried as well. Hopefully, we will go forward with caution and be mindful of what we develop.


Similar Posts

One Comment

  1. I have noticed you don’t monetize your website, don’t waste your traffic, you can earn extra cash every month.
    You can use the best adsense alternative for any type of website (they approve
    all websites), for more details simply search in gooogle:
    boorfe’s tips monetize your website

Comments are closed.