Machine Learning - An Introduction

Tawheed Yousuf
5 min readJul 20, 2021

How often have you been fiddling with your phone before you noticed an ad about a product or a service that you were anticipating buying shortly or how many times do you get recommended a movie or a series that kind of strikes a chord with your personal taste? How does the internet know so much about you and who or what gave you away?

Well, the answer to the question is that it knows because it learns and it was nobody but yourself that gave the information away!

Yes, you heard it right. Machines are learning!

“While Machines are learning and getting advanced, we humans are hooked in the past.”

How do the machines learn?

Before we answer that question let’s answer one more. How do humans learn?

As babies, humans learn to recognize food, toys, certain animals and family members, etc. They do so by repetitively observing phenomena around them and then try to deduce patterns out of such observations. Newer observations help them to rectify any past mistakes.

Machines also learn in a very similar manner. What sits at the heart of all learning processes for humans as well as machines is pattern recognition.

Machine learning

Learning is any process by which a system improves performance from experience. More formally, if a machine performs a task ‘T’ with performance ‘P’ using experience ‘E’, the machine is said to be learning if its performance ‘P’ with respect to task ‘T’ increases with experience ‘E’.

“Machine Learning is concerned with computer programs that automatically improve their performance through experience”

Types of Machine learning

Learning is a vast field and one can very quickly come to realize that all kinds of learning can not be accomplished using a single method. In machine learning, the whole field is divided into three broad categories based on the interaction between the data and the learning task that has to be accomplished:

1. Supervised Machine learning

Consider the task of learning to detect spam e-mails. In the spam detection task, we consider a setting in which the learner receives training e-mails for which the label spam/not-spam is provided. Based on such training, the learner should figure out a rule for labeling a newly arriving e-mail message. These training examples contain significant information (spam/not-spam labels) that is missing in the unknown test examples to which the learned expertise is to be applied. In this setting, the acquired expertise is aimed to predict the missing information for the test data. In such cases, we can think of the environment as a teacher that “supervises” the learner by providing the extra information (labels), hence the name “supervised learning.”

Two types of supervised learning

(a). Regression: Regression is a supervised ML problem in which the outcome or the dependent variable is continuous and real-valued. Some examples of real-world Regression problems are;

  • Real Estate Price Prediction
  • Weather Forecasting,
  • Financial Portfolio Prediction, etc.

(b). Classification: In classification problems, the outcome to be predicted is a categorical variable. For example;

  • Credit Card Fraud Detection
  • Image Classification
  • Spam Detection
  • Insurance Decisioning, etc.

2. Unsupervised Machine learning

Unsupervised learning shares a property in common with supervised learning in that it transforms one dataset into another. But the dataset that it transforms into is not previously known or understood. Unlike supervised learning, there is no right outcome that you’re trying to get the model to duplicate. You just expect an unsupervised algorithm to find patterns in the data and display those patterns. The classical unsupervised ML algorithm is the one and only clustering algorithm.

Clustering

Clustering is an unsupervised ML algorithm that groups a set of data points based on some kind of commonality of structure. Once the groups are formed they are labeled as numbers; cluster 1, cluster 2, cluster 3, and so on. The important point here is that even though the algorithm groups the data into clusters, it doesn't quite know what each cluster represents.

Examples where Clustering is used;

  • Document theme extraction
  • Customer Segmentation
  • Insurance Fraud detection
  • Delivery Store Optimization

Reinforcement learning

Terminologies

  • Agent — the learner and the decision-maker.
  • Environment — where the agent learns and decides what actions to perform.
  • Action — a set of actions that the agent can perform.
  • State — the state of the agent in the environment.
  • Reward — for each action selected by the agent the environment provides a reward. Usually a scalar value.

Reinforcement learning is the training of machine learning models to make a sequence of decisions. The agent learns to achieve a goal in an uncertain environment. In reinforcement learning, machines employ trial and error to come up with a solution to the problem. To get the machine to do what the user wants, artificial intelligence gets either rewards or penalties for the actions it performs. Its goal is to maximize the total reward.

Some applications of Reinforcement learning

  • Traffic Light Control Resource
  • Management Robotics
  • Games
  • Bidding & Advertisement

Steps involved in supervised ML

  1. Define your problem statement
  2. Pre-process your data
  3. Split data into train & validation sets
  4. Train your model
  5. Evaluate the model
  6. Improve the model
  7. Deploy the model and monitor in real-time

--

--