Supervised Learning Algorithms Overview
Supervised Learning Algorithms Overview
Supervised Learning
[Link] M.E.,Ph.D
[ Top 2% Scientist in the World ]
Associate Professor
Department of Computer Science and Engineering Education,
National Institute of Technical Teachers Training and Research (NITTTR), Bhopal.
E-Mail: sganapathy@[Link], [Link]@[Link]
Phone: +91 94888 69712
“Hard Work Never Fail” & “Continuous Effort will bring you a Great Height”
OUTLINE
• AI Vs ML Vs DL
• How does AI working?
• AI & ML
• What is Machine Learning?
• How does ML is working?
• Supervised Learning Algorithms
• Linear Regression
• Naïve Bayes
• Random Forest
• Decision Tree
• MLP
• SVM
• K-NN classifier
• ANN
9/10/2025 [Link], Associate Professor, DCSEE, NITTTR, Bhopal, Madhya Pradesh, INDIA-462002. 2
1
10-09-2025
Outcomes
Learners are able to explain the various supervised learning
algorithms and also to apply them in various applications.
9/10/2025 [Link], Associate Professor, DCSEE, NITTTR, Bhopal, Madhya Pradesh, INDIA-462002. 3
AI Vs ML Vs DL
Artificial Intelligence (AI)
Enable a machine to think as human
2
10-09-2025
AI & ML
3
10-09-2025
• Unsupervised Learning – Handle the unlabeled data (test data without result
column)
4
10-09-2025
5
10-09-2025
11
Linear Regression
12
6
10-09-2025
Regression Analysis
Need for Regression Analysis in Machine Learning
Regression Analysis is used to find the relationship between the
dependent variable and independent variable that are real or continuous
data.
Here, more than two variables are also to be considered for analysis.
The regression is used to predict the future by analyzing the past records
and the data trends.
The analysis is to be done based on the relationship between the
dependent and independent variables of the past records.
This regression is useful for the data analyst and scientist to predict the
future effectively by referring the regression analysis.
13
Linear Regression
Linear Regression finds the relationship
between the dependent and independent
variables of the given input data.
14
7
10-09-2025
Linear Regression
Advantages:
It consumes less computational time to resolve complex problems.
It consumes less time to train any large dataset.
It works based on the assumptions and also proved the prediction result
through statistical method with ease of understanding.
It is useful for predicting the future of various environments including biology,
social science, business, etc.
Disadvantages:
Relationships between the variables are not capable of doing perfect prediction.
Because, the average relationship between the variables may not be the
description of them.
16
8
10-09-2025
Uses one dependent variable and one independent Uses one dependent variable and minimum two
variable to find the relationship independent variables to find the relationship
Complexity is low due to the consideration of one Complexity is high due to the consideration of more
relationship relationships
Visualize with 2D 3D is required for visualization
Low Risk due to the presence of single predictor Risk is high due to the presence of more predictors
Easy to understand the model Difficult to understand than simple linear regression
Simple predictions can be done Complex and Multifactorial predictions can be done
17
8.9
8.1
Sales (in thousands)
1 4.3
5.7
2 4.9 4.3
4.9
3 5.7
4 8.1
1 2 3 4 5
5 8.9 Week
18
9
10-09-2025
𝒙𝒊 𝒚𝒊 (𝒙𝒊 )𝟐 𝒙𝒊 × 𝒚𝒊
1 4.3 1 4.3
2 4.9 4 9.8
3 5.7 9 17.1
4 8.1 16 32.4
5 8.9 25 44.5
Sum= 15 Sum = 31.9 Sum= 55 Sum = 108.1
Average of 𝒙𝒊 Average of 𝒚𝒊 Average of 𝒙𝒊 𝟐 Average of 𝒙𝒊 × 𝒚𝒊
𝒙= 3 𝒚= 6.38 𝒙𝒊 𝟐 = 11 𝒙𝒊 × 𝒚𝒊 = 21.62 19
( ̅ )( )
𝒂𝟏 =
( ) ( ̅)
. .
𝒂𝟏 = = 1.24
𝒂𝟎 = (𝑦)– 𝑎 × (𝑥̅ )
𝑦 = 2.66x + 1.24 20
10
10-09-2025
21
12.58
Sales (in thousands)
10.1
8.9
8.1
5.7
4.3 4.9
1 2 3 4 5 6 8
Week
22
11
10-09-2025
23
12
10-09-2025
Bayes Theorem
• Bayes’ theorem is also known as Bayes’ Rule or Baye’s law, which is used to
determine the probability of a hypothesis with prior knowledge. It depends on
the conditional probability.
• The formula for Bayes’ theorem is given as:
𝑃 𝐵 𝐴 . 𝑃(𝐴)
𝑃 𝐴𝐵 =
𝑃 𝐵 . 𝑃(𝐴|𝐵)
Where,
• P(A|B) is a POSTERIOR (The probability of “A” being True, given “B” is True.)
• P(B|A) is a LIKELIHOOD (The probability of “B” being True, given “A” is True.)
• P(A) is a PRIOR (The probability “A” being True. This is the knowledge.)
• P(B) is a MARGINALIZATION (The probability “B” being True.)
25
Weather Yes No
Overcast 5 0
Rainy 2 2
Sunny 3 2
Total 10 4
26
13
10-09-2025
Overcast 5 0 5 + 0 / 14 = 5 / 14 = 0.35
Rainy 2 2 2 + 2 / 14 = 4 / 14 = 0.29
Sunny 3 2 3 + 2 /14 = 5 / 14 = 0.35
All 10/14 = 0.71 4 / 14 = 0.29
27
14
10-09-2025
Disadvantages:
Naïve Bayes assumes that all features are independent or unrelated,
so it cannot learn the relationship between features.
29
30
15
10-09-2025
Random Forest
31
16
10-09-2025
Step 2: Create decision trees for your chosen data points (Subsets).
33
34
17
10-09-2025
35
Parallelization- Each tree is built from scratch using different data and properties.
This means we can fully utilize the CPU to create random forests.
Train-Test split- In a random forest, there is no need to separate the data for train
and test because the decision tree will always miss 30% of the data.
18
10-09-2025
Land Use: Random Forest Classifier is also used to classify places with
similar land-use patterns.
Market Trends: You can determine market trends using this algorithm.
37
Decision Tree
38
19
10-09-2025
It has a hierarchical tree structure starts with one main question at the
top called a node which further branches out into different possible
outcomes where:
39
Branches: These are the lines that connect nodes. It shows the flow
from one decision to another.
Internal Nodes are Points where decisions are made based on the
input features.
Leaf Nodes: These are the terminal nodes at the end of branches that
represent final outcomes or predictions
40
20
10-09-2025
41
Solution:
42
21
10-09-2025
44
22
10-09-2025
46
23
10-09-2025
47
Versatility: It means they can be used for different types of tasks can work well
for both classification and regression
No Need for Feature Scaling: They don’t require you to normalize or scale your
data.
24
10-09-2025
Instability: instability means that the model can be unreliable slight variations in
input can lead to significant differences in predictions.
Bias towards Features with More Levels: Decision trees can become biased
towards features with many categories focusing too much on them during
decision-making.
This can cause the model to miss out other important features led to less accurate
predictions.
49
Medical Diagnosis
Attack Prediction
50
25
10-09-2025
References
• [Link]
• [Link]
• [Link]
THANK YOU
9/10/2025 [Link], Associate Professor, DCSEE, NITTTR, Bhopal, Madhya Pradesh, INDIA-462002. 52
26
10-09-2025
Unsupervised Learning
[Link] M.E.,Ph.D
[ Top 2% Scientist in the World ]
Associate Professor
Department of Computer Science and Engineering Education,
National Institute of Technical Teachers Training and Research (NITTTR), Bhopal.
E-Mail: sganapathy@[Link], [Link]@[Link]
Phone: +91 94888 69712
“Hard Work Never Fail” & “Continuous Effort will bring you a Great Height”
SESSION-2
OUTCOME: Learners are able to explain the various clustering algorithms and also to
apply them in various applications
9/10/2025 [Link], Associate Professor, DCSEE, NITTTR, Bhopal, Madhya Pradesh, INDIA-462002. 54
27
10-09-2025
AI Vs ML Vs DL
Artificial Intelligence (AI)
Enable a machine to think as human
55
56
28
10-09-2025
AI & ML
57
58
29
10-09-2025
• Unsupervised Learning – Handle the unlabeled data (test data without result
column)
59
30
10-09-2025
31
10-09-2025
Clustering Techniques
Types:
1. Exclusive Clustering: K-means
2. Overlapping Clustering: Fuzzy C-means
3. Hierarchical Clustering: Agglomerative clustering, divisive clustering
4. Probabilistic Clustering: Mixture of Gaussian models
32
10-09-2025
Clustering Techniques
Exclusive Clustering: K-means : randomly initialize the k cluster centers, and
iterate between the two steps we just saw.
1. Randomly initialize the cluster centers, c1, ..., cK
2. Given cluster centers, determine points in each cluster
For each point p, find the closest ci. Put p into cluster i
3. Given points in each cluster, solve for ci
Set ci to be the mean of points in cluster i
4. If ci have changed, repeat Step 2
Clustering Techniques
Exclusive Clustering
Pros
Simple, fast to compute
Converges to local minimum of within-cluster squared error
Cons
Setting k?
Sensitive to initial centers
Sensitive to outliers
Detects spherical clusters
Assuming means can be computed
33
10-09-2025
Clustering Techniques
Overlapping Clustering: Fuzzy C-means : One data point may belong to two or
more cluster with different memberships.
Objective function:
where 1 ≤ m< ∞
An extension of k-means
Clustering Techniques
Overlapping Clustering:
Pros:
Allows a data point to be in multiple clusters
A more natural representation of the behavior of genes
- genes usually are involved in multiple functions
Cons:
Need to define c (k in K-means), the number of clusters
Need to determine membership cutoff value
Clusters are sensitive to initial assignment of centroids
- Fuzzy c-means is not a deterministic algorithm
34
10-09-2025
Clustering Techniques
Hierarchical Clustering:
Clustering Techniques
35
10-09-2025
Clustering Techniques
Agglomerative Clustering:
It is more popular then divisive methods.
At the beginning, each data point forms a cluster (also called a node).
Merge nodes/clusters that have the least distance.
Go on merging
Eventually all nodes belong to one cluster
Clustering Techniques
Hierarchical Clustering:
Pros
- Dendograms are great for visualization
- Provides hierarchical relations between clusters
- Shown to be able to capture concentric clusters
Cons
- Not easy to define levels for clusters
- Experiments showed that other clustering techniques outperform hierarchical clustering
36
10-09-2025
Clustering Techniques
Probabilistic Clustering:
Probabilistic model based clustering assumes that a cluster is a parameterized
distribution.
Using the data to be clustered as the observed samples, can estimate the
parameters of the clusters.
A mixture model assumes that a set of observed objects is a mixture of
instances from multiple probabilistic clusters.
37
10-09-2025
Clustering algorithms are better suited for more complex processing tasks, such as
organizing large datasets into clusters.
They are useful for identifying previously undetected patterns in data and can help
identify features useful for categorizing data.
References
• [Link]
• chrome-
extension://efaidnbmnnnibpcajpcglclefindmkaj/[Link]
anils/ppt/Unsupervised%20Learning_CSE543_ASh.pdf
• [Link]
python/
• [Link]
• [Link]
clustering-from-scratch-in-python-a277c23563ac
• [Link]
38
10-09-2025
THANK YOU
9/10/2025 [Link], Associate Professor, DCSEE, NITTTR, Bhopal, Madhya Pradesh, INDIA-462002. 77
39