0% found this document useful (0 votes)
2 views

Module II-2

The document discusses unsupervised machine learning, highlighting its definition, importance, and applications in finding hidden patterns in unlabeled data. It contrasts unsupervised learning with supervised learning, emphasizing its advantages and disadvantages, as well as various algorithms like clustering and association rules. The content is aimed at understanding how unsupervised learning can be utilized in real-world scenarios where labeled data is not available.

Uploaded by

teddy haile
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Module II-2

The document discusses unsupervised machine learning, highlighting its definition, importance, and applications in finding hidden patterns in unlabeled data. It contrasts unsupervised learning with supervised learning, emphasizing its advantages and disadvantages, as well as various algorithms like clustering and association rules. The content is aimed at understanding how unsupervised learning can be utilized in real-world scenarios where labeled data is not available.

Uploaded by

teddy haile
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Ethiopian Defence University, College of

Engineering

CT-6713: Machine Learning in


Cybersecurity

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 1


Unsupervised Machine Learning
• In the previous topic, we learned supervised machine
learning in which models are trained using labeled data
under the supervision of training data.
• But there may be many cases in which we do not have
labeled data and need to find the hidden patterns from the
given dataset.
• So, to solve such types of cases in machine learning, we
need unsupervised learning techniques.

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 2


What is Unsupervised Learning?
• As the name suggests, unsupervised learning is a machine
learning technique in which models are not supervised
using training dataset.
• Instead, models itself find the hidden patterns and insights
from the given data.
• It can be compared to learning which takes place in the
human brain while learning new things. It can be defined
as:
“Unsupervised learning is a type of machine learning in
which models are trained using unlabeled dataset and
are allowed to act on that data without any supervision.”

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 3


Contd…
• Unsupervised learning cannot be directly applied to a
regression or classification problem
• Because unlike supervised learning, we have the input data
but no corresponding output data.
• The goal of unsupervised learning is to find the underlying
structure of dataset
• Group that data according to similarities, and represent
that dataset in a compressed format.
• Example: Suppose the unsupervised learning algorithm is
given an input dataset containing images of different types
of cats and dogs.

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 4


Contd…
• The algorithm is never trained upon the given dataset,
which means it does not have any idea about the features of
the dataset.
• The task of the unsupervised learning algorithm is to
identify the image features on their own.
• Unsupervised learning algorithm will perform this task by
clustering the image dataset into the groups according to
similarities between images.

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 5


Why use Unsupervised Learning?
• Below are some main reasons which describe the
importance of Unsupervised Learning:
• Unsupervised learning is helpful for finding useful insights
from the data.
• Unsupervised learning is much similar as a human learns
to think by their own experiences, which makes it closer to
the real AI.
• Unsupervised learning works on unlabeled and
uncategorized data which make unsupervised learning
more important.
• In real-world, we do not always have input data with the
corresponding output so to solve such cases, we need
unsupervised learning.

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 6


Working of Unsupervised Learning
• Working of unsupervised learning can be understood by
the below diagram:

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 7


Types of Unsupervised Learning Algorithm
• Clustering: Clustering is a method of grouping the objects into
clusters such that objects with most similarities remains into a
group and has less or no similarities with the objects of another
group.
• Cluster analysis finds the commonalities between the data
objects and categorizes them as per the presence and absence of
those commonalities.
• Association: An association rule is an unsupervised learning
method which is used for finding the relationships between
variables in the large database.
• It determines the set of items that occurs together in the dataset.
• Association rule makes marketing strategy more effective.
• Such as people who buy X item (suppose a bread) are also tend
to purchase Y (Butter/Jam) item.
• A typical example of Association rule is Market Basket Analysis.

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 8


Advantages of Unsupervised Learning
• Unsupervised learning is used for more complex tasks as
compared to supervised learning
• Because, in unsupervised learning, we don't have labeled
input data.
• Unsupervised learning is preferable as it is easy to get
unlabeled data in comparison to labeled data.

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 9


Disadvantages of Unsupervised Learning
• Unsupervised learning is intrinsically more difficult than
supervised learning as it does not have corresponding
output.
• The result of the unsupervised learning algorithm might be
less accurate as input data is not labeled, and algorithms do
not know the exact output in advance

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 10 1


Unsupervised learning Algorithms
• K-means clustering
• DBSCAN
• Hierarchal clustering
• Principal Component Analysis (PCA)
• Apriori algorithm

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 11 1


K – Means Clustering Algorithm

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 12 1


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 13 1


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 14 1


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 15 1


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 16 1


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 17 1


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 18 1


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 19 1


DBSCAN Clustering Algorithm

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 20 2


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 21 2


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 22 2


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 23 2


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 24 2


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 25 2


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 26 2


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 27 2


Principal Component Analysis(PCA) Algorithm

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 28 2


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 29 2


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 30 3


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 31 3


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 32 3


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 33 3


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 34 3


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 35 3


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 36 3


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 37 3


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 38 3


Contd…

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 39 3


Summing up
Supervised Learning Unsupervised Learning
Supervised learning algorithms are trained using Unsupervised learning algorithms are
labeled data. trained using unlabeled data.
Supervised learning model takes direct feedback Unsupervised learning model does not
to check if it is predicting correct output or not. take any feedback.

Supervised learning model predicts the output. Unsupervised learning model finds the
hidden patterns in data.
In supervised learning, input data is provided to In unsupervised learning, only input data is
the model along with the output. provided to the model.
The goal of supervised learning is to train the The goal of unsupervised learning is to find
model so that it can predict the output when it is the hidden patterns and useful insights
given new data. from the unknown dataset.

Supervised learning needs supervision to train Unsupervised learning does not need any
the model. supervision to train the model.

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 40 4


Contd…
Supervised Learning Unsupervised Learning
Supervised learning can be categorized Unsupervised Learning can be classified
in Classification and Regression problems. in Clustering and Associations problems.
Supervised learning can be used for those Unsupervised learning can be used for those cases
cases where we know the input as well as where we have only input data and no
corresponding outputs. corresponding output data.
Supervised learning model produces an Unsupervised learning model may give less
accurate result. accurate result as compared to supervised
learning.
Supervised learning is not close to true Unsupervised learning is more close to the true
Artificial intelligence as in this, we first train Artificial Intelligence as it learns similarly as a child
the model for each data, and then only it can learns daily routine things by his experiences.
predict the correct output.
It includes various algorithms such as Linear
Regression, Logistic Regression, Support
Vector Machine, Multi-class Classification,
Decision tree, Bayesian Logic, etc.

apt. Mehari K (Ph.D) Ethiopian University, Engineering College 41 4

You might also like