Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

Introduction to Machine Learning

What is machine learning?

So what is machine learning anyway? ML is a subdomain or a subfield of artificial intelligence. In the last few years, machine learning has become one of the most important branches of artificial intelligence.

Machine learning is everywhere from classifying your email as spam or not to identifying faces in the photos and automatically tagging our friends, to recommend similar products, search engines, movie recommendation etcetera.

In machine learning, we use data from the past to make future predictions.

Tom Mitchell defines machine learning as,

“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.”

The above statement means that if a computer program can improve its performance on a task based on the experience, then we can say that it has learned.

Types of machine learning:

machine learning types

There are three types of machine learning

  • Supervised
  • Unsupervised and
  • Reinforcement Learning

We’ll go through each of them briefly

Supervised Learning:

In supervised learning, the training set is labeled, meaning it has both the input data and the desired output.

Algorithms which falls under this category try to establish a relationship or to learn the mapping function between the input and output attributes.

Later it uses these mappings to predict the output of unseen data.

Two categories of algorithms in supervised learning are:

  • Classification and
  • Regression


A classification problem is whenever we use the data to predict categories.

For example, when we are trying to classify whether an email is a spam or not or classifying whether an image contains a cat or dog.

These are called binary classification. When we have more than two categories to classify, then they are called multi-class classification.

Some popular classification algorithms are

  • K-nearest neighbors
  • Support Vector Machines
  • Random Forest
  • Naive Bayes


A regression problem is when the outputs are continuous or real values. Regression is used to predict values of the desired target when the target is continuous.

For example, let’s say we have an experience vs. salary data. Then the goal of regression is to predict the salary of a person knowing the experience.

Some popular regression algorithms are

  • Linear Regression
  • Polynomial Regression
  • Ridge Regression
  • Lasso Regression

Unsupervised learning:

Unlike supervised learning here, the data points are uncategorized, i.e., it does not have a target attribute associated with them. Here we work through observations and find structures in the data.


The most popular unsupervised learning technique is clustering. In, clustering, we group the data points based on similarities and dissimilarities to objects of other groups.

Commonly used algorithms for clustering are

  • k-means clustering
  • Hierarchical clustering


Association rule learning is all about discovering potential rules between products from the transaction data, such as people who bought this also bought. For example, the rule,

                     {mobile phone, back cover} => {tempered glass}

This rule means that customers who bought a mobile phone and back cover also bought tempered glass.

This information can be used to recommend products to customers.

Algorithms fall under this category are

  • Apriori
  • Eclat

Reinforcement learning:

Reinforcement learning is like trial and error learning. It is similar to both supervised and unsupervised learning.

The results generated are associated with a penalty or reward in reinforcement learning.

For example, assume that you are training your dogs. If they have done an excellent job of following your commands, you reward them by giving a treat.

This is reinforcement. Eventually, the dog figures out what are the behaviors which earn him rewards.

Similarly, the algorithm is rewarded for correct decisions and penalized for wrong decisions.


In this post, you learned what machine learning is and what are the types of machine learning.

In simple words, Machine learning teaches machines to carry out tasks by themselves. Machine learning enables computers to learn from experience rather than hard-coding insights into the algorithm.

Supervised: In supervised learning, we have labeled data which we try to predict whether yes or no, such as “Is this E-mail spam” or “Is this tumor cancerous.”

Unsupervised: Here, the data is unlabelled, and we try to find hidden structures in the data. In the real world, we often deal with unsupervised data.

Reinforcement: Trial and error learning. Rewarded for right decisions and penalized for wrong decisions.

Love What you Read. Subscribe to our Newsletter.

Stay up to date! We’ll send the content straight to your inbox, once a week. We promise not to spam you.

Subscribe Now! We'll keep you updated.