What Is Machine Learning? Types of Machine Learning Explained for Beginners

Machine learning may sound complicated, but the basic idea is simple.

Machine learning helps computers learn patterns from existing data and use those patterns to make predictions or decisions.

Instead of writing a separate rule for every possible situation, we provide examples to the computer. The machine-learning system studies those examples and learns how different pieces of information are connected.

Machine learning may sound complicated, but the basic idea is simple.
Machine learning helps computers learn patterns from existing data and use those patterns to make predictions or decisions.
Instead of writing a separate rule for every possible situation, we provide examples to the computer. The machine-learning system studies those examples and learns how different pieces of information are connected.
A Simple Everyday Example
Imagine that you want to teach a child how to recognize an apple.
Recognizing an Apple
  • Apples are usually round.
  • They may be red, green or yellow.
  • They grow on trees.
  • They have a particular shape and texture.
After seeing enough examples, the child may recognize an apple they have never seen before.
Machine learning works in a similar way. We provide historical examples, and the computer learns patterns that can be applied to new data.
Traditional Programming Versus Machine Learning
In traditional programming, a developer writes specific rules.
If the customer has not paid for three months, mark the account as high risk.
In machine learning, we provide historical customer information, including which customers became high risk. The algorithm learns patterns that may be difficult to define through one simple rule.
Traditional Programming
Data + Written Rules
Result
Where Is Machine Learning Used?
Machine learning is already used in many familiar applications:
Netflix and YouTube recommendations
Email spam detection
Banking fraud detection
Customer-churn prediction
Sales forecasting
Product recommendations
Voice assistants
Medical-image analysis
Traffic and navigation applications
Does Every Data Problem Need Machine Learning?
No. This is important for beginners to understand.
Machine Learning May Not Be Needed
  • Calculate total monthly sales
  • Create a dashboard
  • Identify the highest-selling product
  • Compare revenue across regions
  • Count active customers
  • Prepare a standard report
Machine Learning May Be Useful
  • Predict what may happen
  • Classify new records
  • Discover hidden groups
  • Recommend an action
  • Learn through repeated decisions
Three Main Types of Machine Learning
The three commonly discussed types of machine learning are:
01
Supervised Learning
Learns from examples containing known answers.
02
Unsupervised Learning
Discovers groups and patterns without known answers.
03
Reinforcement Learning
Learns through actions, rewards and penalties.
1. Supervised Learning
Supervised learning means learning from examples that already contain the correct answer.
Think About a Student Learning With a Teacher
The teacher provides questions along with their correct answers. The student studies these examples and learns how to answer similar questions in the future.
In supervised learning, the correct answer is stored in a column called the target column or label.
Layman Example: Sorting Fruit
Imagine that we have a basket containing apples and oranges. For every fruit, we record:
  • Weight
  • Colour
  • Size
  • Shape
  • Fruit name
The fruit name is already known. The model studies the characteristics of apples and oranges. When it receives a new fruit, it predicts whether that fruit is an apple or an orange.
Because the training examples included the correct fruit names, this is supervised learning.
Supervised learning explained with labelled apples and oranges
Supervised learning uses labelled examples with known answers to learn how to predict new data.
Business Example: Customer Churn
A telecommunications company may have historical customer data containing:
  • Contract type
  • Monthly charges
  • Number of support calls
  • Length of membership
  • Payment method
  • Churn status
The Churn column tells us whether each previous customer left the company. The model studies the differences between customers who stayed and customers who left.
Two Main Supervised Learning Problems
Classification
Used when the predicted answer belongs to a category.
  • Customer will leave or stay
  • Loan will default or not default
  • Email is spam or not spam
  • Transaction is fraudulent or legitimate
  • Patient test is positive or negative
Which category does this record belong to?
Regression
Used when the predicted answer is a continuous numerical value.
  • House price
  • Monthly sales
  • Delivery time
  • Customer spending
  • Insurance cost
What numerical value should we predict?
How to Recognize Supervised Learning
Does the historical dataset already contain the answer I want to predict?
If yes, the problem may require supervised learning.
2. Unsupervised Learning
Unsupervised learning means learning from data that does not contain a known answer or target column.
There is no teacher providing the correct result. The algorithm explores the data and searches for similarities, differences, groups or hidden patterns.
Layman Example: Organizing a Mixed Wardrobe
Imagine that someone gives you a large pile of clothes but does not tell you how to organize them.
  • Shirts in one group
  • Trousers in another group
  • Winter clothing in another group
  • Formal clothing in another group
Nobody provided the correct group for each item. You created the groups by examining their similarities. This is similar to unsupervised learning.
Unsupervised learning explained by organizing mixed clothes into natural groups
Unsupervised learning discovers similarities and creates groups without being given the correct answers.
Business Example: Customer Segmentation
A retail company may have customer information such as:
  • Age
  • Annual income
  • Purchase frequency
  • Average order value
  • Product preferences
The company does not already have customer-group labels. An unsupervised learning algorithm may discover groups such as:
Frequent high-value customers
Occasional discount shoppers
New customers
Customers becoming inactive
Clustering
Clustering is one of the most common unsupervised learning techniques. It places similar records into groups called clusters.
  • Grouping customers by purchasing behaviour
  • Grouping stores by performance
  • Grouping products by sales patterns
  • Grouping website visitors by activity
  • Grouping neighbourhoods by common characteristics
Which records are similar enough to form meaningful groups?
For beginners, customer segmentation through clustering is one of the easiest ways to understand unsupervised learning.
How to Recognize Unsupervised Learning
Do I want the algorithm to discover patterns or groups without a known target?
If yes, the problem may require unsupervised learning.
3. Reinforcement Learning
Reinforcement learning means learning through actions, rewards and penalties.
The system is called an agent. It interacts with an environment, takes actions and observes the results.
Helpful Action
Reward
Unhelpful Action
Penalty
Layman Example: Learning to Ride a Bicycle
A child learning to ride a bicycle does not memorize every possible movement before starting. The child learns through repeated attempts.
  • Maintaining balance allows the bicycle to move forward.
  • Turning too sharply may cause the bicycle to fall.
  • Pedalling at the right speed improves stability.
Each attempt provides feedback. Gradually, the child learns which actions work best.
Another Example: Training a Dog
When a dog follows a command correctly, it may receive a treat.
Correct Action
Reward
Incorrect Action
No Reward
Reinforcement learning explained by training a dog with actions and rewards
Reinforcement learning improves behaviour through repeated actions, feedback and rewards.
Technology Example: A Game-Playing System
Imagine an AI system learning to play a video game. The system may receive:
  • Positive points for reaching a goal
  • Positive points for collecting an item
  • Negative points for losing a life
  • Negative points for making an unsafe move
The system plays repeatedly and learns which sequence of actions produces the highest reward.
Where Is Reinforcement Learning Used?
Robotics
Game-playing systems
Autonomous vehicles
Traffic-signal optimization
Warehouse navigation
Resource allocation
Dynamic recommendations
Reinforcement learning is usually more advanced than the supervised and unsupervised learning projects completed by beginners.
Comparing the Three Types
Type Data Provided How It Learns Simple Example
Supervised Data with known answers Learns from labelled examples Predict whether a customer will leave
Unsupervised Data without known answers Discovers groups and hidden patterns Group similar customers
Reinforcement Actions, rewards and penalties Learns through repeated interaction Learn how to play a game
One Business Problem Explained Three Ways
Suppose an online retailer wants to understand and support its customers.
Supervised Learning
Predict which customers will stop purchasing.
The historical dataset contains a known churn answer.
Unsupervised Learning
Divide customers into groups based on purchasing behaviour.
No customer-group labels already exist.
Reinforcement Learning
Learn which promotional offer should be shown over time.
The system learns from rewards such as clicks or purchases.
How Do You Choose the Correct Type?
Start with the business question—not the algorithm.
Choose Supervised Learning When:
  • You have historical data with known answers.
  • You want to predict a category or numerical value.
  • A meaningful target column is available.
Choose Unsupervised Learning When:
  • You do not have a known target.
  • You want to discover groups or patterns.
  • You are exploring the structure of the dataset.
Choose Reinforcement Learning When:
  • A system must make repeated decisions.
  • Each action produces a reward or penalty.
  • The goal is to improve a long-term strategy.
Common Beginner Mistakes
Selecting an Algorithm First
Do not begin by saying, “I want to use a random forest.” First define the problem and understand the data.
Confusing Classification and Regression
Category → Classification
Continuous Number → Regression
Assuming Every Dataset Needs a Target
A target is required for supervised learning, but it is not required for clustering and other unsupervised techniques.
Using Reinforcement Learning for a Simple Prediction
A normal prediction problem usually does not require reinforcement learning. Classification or regression may provide a simpler solution.
Expecting the Model to Understand the Business Automatically
  • People must define the correct problem.
  • People must select meaningful data.
  • People must check data quality.
  • People must evaluate the results.
  • People must interpret the business impact.
  • People must consider fairness and privacy.
Quick Practice
Predict whether a bank customer will default on a loan.
Supervised learning — classification
Predict the selling price of a house.
Supervised learning — regression
Group retail customers based on their shopping behaviour.
Unsupervised learning — clustering
Train a robot to navigate a warehouse using rewards and penalties.
Reinforcement learning
Predict next month’s sales amount.
Supervised learning — regression
Final Summary
Machine learning allows computers to learn patterns from data and apply those patterns to new situations.
Supervised Learning
Learns from data containing known answers.
Unsupervised Learning
Discovers patterns in data without known answers.
Reinforcement Learning
Learns through actions, rewards and penalties.
Start With Three Questions
  1. What business problem am I solving?
  2. Does my dataset contain a known target?
  3. Do I want to predict an answer, discover a pattern or learn through repeated actions?
Once these questions are clear, selecting the appropriate type of machine learning becomes much easier.