Introduction to Machine Learning

Introduction to Machine Learning

Machine Learning has become a prominent subject in recent years, finding utility across diverse industries. Its applications range from automating routine tasks to analysing vast datasets for valuable insights, aiding in more informed business decisions.

Let's delve deeper into the concept of machine learning with a practical example:

Consider a scenario where you're in the real estate business and need a system to predict house prices based on features such as the number of rooms, size, location, and age of the house.

One way to tackle this problem is by creating a traditional computer program. We would use our understanding of house features to write rules like:

  • If a house has x number of rooms, increase the price by y.

  • If a house is located in area x, increase the price by y%.

Do you notice the challenge with this traditional method? In practical situations, it's nearly impossible to anticipate and code for every rule and scenario.

What if we could develop a system that learns to make predictions independently? This system could discern the necessary rules from the provided dataset. That's the essence of Machine Learning.

Machine Learning, is a branch of computer science, which deals with techniques that help computer systems to learn and improve on how to perform a specific task, without explicitly programming them to do so.

Types of Machine Learning

Machine learning algorithms can broadly be classified into three types:

  • Supervised Learning

  • Unsupervised Learning

  • Reinforcement learning

What is Supervised Learning?

Supervised Learning Image

In supervised learning, the model trained on a labelled dataset. By labelled dataset, we mean that the data contains prior examples of the correct and incorrect outcomes.

A model can then utilize the dataset to train and build logic to map the inputs given to desired outputs.

Types of Supervised Machine Learning

  • Classification: This is when a model learns to predict whether an input belongs to one category or another as output, such as whether a given image is of a dog or a cat, etc.

  • Regression: This is when a model predicts a continuous value (numerical value), such as price of a house, etc.

What is Unsupervised Learning?

Unsupervised Learning

In unsupervised learning, the model is given unlabelled dataset, which does not contain any correct or incorrect examples. The model itself has to find meaningful patterns or abnormalities in the data.

In the above image, we see that the algorithm is given raw input data, containing various shapes, and then learns to group them together based on similarities.

There are two types of Unsupervised Learning - Clustering, and Association.

  • Clustering: A clustering problem is when you want to identify hidden groups in the data. An example would be customer segmentation (grouping customers based on their purchasing behaviours).

  • Association: An association rule learning problem is where you want to discover rules that describe large portions of your data, such as people that buy X also tend to buy Y.

What is Reinforcement Learning?

Reinforcement Learning

In reinforcement learning, the model learns by interacting with an environment. The agent receives feedback form of a reward for performing an action correctly and in form of penalty for performing a wrong action. Based on the feedback it receives, the agent learns to perform an optimal set of actions for a task.

In the above image, we see that the agent has been give two options, one with fire and another one with water. Based on the choice it makes, it is given feedback, which it utilizes to perform actions repeatedly until an optimal policy is found..

It is basically leveraging the rewards obtained, the agent improves its environment knowledge to select the next action.


In this blog, I have presented the basic concepts of Machine Learning. I hope this was helpful, and hopefully motivated you enough to get interested in the topic.