Post

# First Guide To Machine Learning

• 27.9k
• 0
• 15

## What is Machine Learning?

Let us try to understand Machine Learning in layman’s language. If you observe Machine Learning, it is composed of two words - Machine, and Learning. So, looking at these two words, we could simply figure out that “Machines can Learn” is what Machine Learning is all about. Now, that’s a very basic idea about ML. Let’s go a step ahead.

Considering our previous definition, if machines can learn from previous experiences, without being explicitly programmed, this is known as Machine Learning. In the above approach to the definition, we see two new terms - (a) previous experience, and (b) explicitly programmed. Let us discuss them in detail. Providing our system, the previous experience helps it to understand the relationship between input and put. Or, we may also say, it helps machines to learn how the output should be calculated when given an input. The second term ‘explicitly programmed’ succeeded by ‘without’ tells us that machines do not form a direct relationship with a certain input and a specified output, which means for any given value of ‘X’, it is not mandatory to get the output as value ‘Y’; it may vary too.

A decent explanation of the above discussion can be summed up as a way to scientifically use past experiences to predict the future to help derive more accurate outcomes.

## Conventional Programming

Recalling from our school days, we have always learned how computers work. As we give input to the computer, the computer performs a function on it and gives the output. Fig -1-1 illustrates the same.

Figure 1-1 Conventional Programming

Considering Fig – 1-1 and taking sample values, let the input be ‘2, 3’ and program be addition ‘+’, then the expected output is ‘5’.

Figure 1-2 Conventional Programming with Sample Input

The computer takes ‘2,3’ as input performs addition operation ‘+’ on it and calculates ‘5’ as the output.

## Machine Learning Approach

Machine learning has a dramatic approach to processing. The output and the program switch their position to get a new program, as shown in Fig – 1-3.

Figure 1-3 Machine Learning Approach

Again, we will consider input as ‘2, 3’ but this time, we are going to feed the output to the computer, i.e., ‘5’ and will get the program as the actual output which here is an additional operation ‘+’.

Figure 1-4 Machine Learning Approach with Sample Input

When the computer is given input ‘2, 3’ and output ‘5’, the computer performs analysis and forms a relationship between input and output. We may also say, the computer figures out how a certain output is calculated when given an input. And in this example, the computer computes relations between ‘2, 3’ and ‘5’ and gets additional operation ‘+’ as the program.

Now, the benefit of this approach is that the resulting program that has been trained is capable of predicting the desired output based on the provided data.

So, we have now reached an understanding of where we can actually move to a sophisticated definition of Machine Learning.

## Machine Learning Definition

“A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P, if its performance at tasks in T, as measured by P, improves with experience E. “ ~ Tom Mitchell, Carnegie Mellon University

Whoa! What the heck was that?

Hang on!

Before you skip it, let us try to understand this definition with an example.

Suppose, we want a program to predict traffic patterns at an intersection (task T), we can run it through machine learning algorithm with data about past traffic patterns (experience E), and if it was learned, it will perform better in predicting future traffic patterns (performance P).

## Applications of Machine Learning

Before you get to the list where machine learning is implemented, let us try to figure out where are we using Machine Learning in our day to day life.
So, we all use Facebook Messenger for personal or business purposes. Let us do it this way -  open your Facebook Messenger and send a message “Meet me tomorrow, at 10 am” to any of your friends. After the message is sent, you’ll see a link attached to your message that says, “START PLAN”.

Click on START PLAN, you can then add date, time, location and get a notification on your mobile an hour ago before the plan is scheduled.

What’s all this happening?

What happened just now is a result of Natural Language Processing. Facebook actually read your message and analyzed that there are a day and time in the message and you would like to save as a plan so that you stay updated about the same. And yes, all this happened because the Facebook Machine Learning algorithm can understand the intent in the message.

Let us take one more example. This time, just Facebook. We love to share pictures on the social media platform with friends and families. Take an instance, when one of your friends uploads a group picture on Facebook that includes you but forgets to tag you. The odds are in good favor that you might get a notification on Facebook saying, “Adam (your friend) uploaded a picture that might include you”.

Hmm, that’s interesting!

How this works is Facebook took all your pictures from your profile and trained the system by feeding your picture, so, the next time your friend posts a picture, it goes through the same system and recognizes your face and eventually, you get the notification. This explanation is a birds-eye view in what actually happens, and is an application of Image Processing.

Some more examples,
• Virtual Personal Assistant

Alexa, Google Now, and Cortana are popular examples of virtual assistants. They can assist us in finding information over voice command, for example, “What’s my schedule for today”, “When is my meeting”, “Is my flight delayed?”
• Video Surveillance

These are non-days powered with AI which helps detect crime before it may happen. It tracks the unusual behavior of a person, like stumbling, napping on a bench, or standing steady for a longer period. And when such activities happen and are reported to be true, it works feedback and helps the system to improve.
• Refining Search Engine Result

Google, Bing improves the search results by using machine learning. if you search a query and spend a long time on the top results, it analyses that the output is sophisticated, and if you move to second, third page without opening any of the results, the search engine estimates that the server output is not satisfactory, and in this way, the algorithm improves the search results at the backend.
• Recommendation Engines

We need not discuss how good these e-commerce platforms are in recommending similar products. On the basis of the user’s behavior, these websites/app, liked/added to cart, recommend the related products.
Having discussed all that, it’s high time we get technical and look at how we can classify machine learning.

## Types of Machine Learning

Supervised learning and unsupervised learning are the two most widely adopted machine learning methods. There are others like Reinforcement and Semi-supervised learning too. Let’s take an overview of each of them.

Supervised Learning

A Supervised Machine algorithm is trained by feeding a labeled data set, such as an input, where the desired output is already known. This approach helps us to form a relationship that maps input to the desired output value. It helps in predicting the output value for new data based on the relationship that is formed from the previous data sets.

Note

Three terms to remember for supervised machine learning are (a) Predictive Model (b) Labelled Data (c) Direct Feedback

Example of supervised learning,
• If a student will pass or not?
• If insurance will be claimed or not?
• How many runs will be scored in a cricket match?
• What will be the salary of a new employee?
Supervised machine learning can further be classified into,
1. Classification
2. Regression

Let us discuss in brief.

Classification

In this type of problem, we seek a yes or no response. It forms some conclusions from observed values whether an event will occur or not.

From our previous example, if a student will pass or not, insurance will be claimed or not will fall in the category of classification.

Regression

In this type of problem, the predicted value lies somewhere in a continuous spectrum; regression is often used for forecasting and finding out a relation between variables. Regression has many methods, we will discuss in detail later in some other article.

From our previous example, the number of runs that will be scored, and what will be the salary of a new employee is the case scenarios for the regression.

Common Algorithms,
• Nearest Neighbors
• Linear Regression
• Decision Tree
• Naive Bayes
Unsupervised Learning

This machine learning approach finds the pattern in the data. It learns from the data that has not been labeled, which means the input values are given but no corresponding output values. The system is not provided with the correct answer and is left to discover an interesting structure in the data.

In contrast to supervised machine learning where the data is labeled, the algorithm in unsupervised machine learning builds a relationship between elements in the dataset to form structure, or group the elements in clusters without any help. These are many algorithms that help us to perform unsupervised learning, but the goal remains the same to find hidden patterns, features or structures in the dataset.

Unsupervised machine learning helps us to make a decision like,
1. Clustering
2. Association

We’ll discuss Clustering & Association in detail later, with that some common algorithms that are used in machine learning language are.
• K-means Clustering
• Hierarchical Clustering
• DBSCAN Clustering
• Anomaly Detection
Reinforcement Learning

Using this algorithm, the machine learns to make specific decisions, using a trial and error approach. The software agents are exposed in the environment and are ought to take actions, in order to maximize its performance. The feedback is given to the agent to learn its behavior and perform better next time which is known as reinforcement.

The major application of reinforcement learning can be seen in robotics, and navigations products and also in gaming, for example, the system learns to get the maximum points in a game over many moves.

Reinforcement learning usually includes three primary components.

The agent is supposed to make decisions, the environment is where the agent can interact with everything, and actions define what an agent can do. The main aim for the agent is to look for actions, that can maximize the expected output over a given period of time. The agent will reach better and faster output by following good policy, and the aim of reinforcement learning is to find the best policy.

## Summary

This was a basic introduction to machine learning. Machine Learning is a growing field of AI and expected to grow for the next several years. Machine Learning engineers are most in-demand today. You can use almost any programming language to build ML systems. Python is one of the most popular ML programming languages. To learn more about other ML programming languages, read Best Programming Languages for Machine Learning.

Recommended Free Ebook
Similar Articles