SlideShare a Scribd company logo
1 of 17
Clustering
Algorithm
Saja Ali
● Introduction
● Types of clustering algorithms
● Image Segmentation By clustering
● K Means
● How Does K-means clustering works?
● What is Hierarchical Clustering?
● Types of Hierarchical Clustering
● Which method is better between them?
Topics
A clustering algorithm is a popular technique in big data analytics that
involves grouping similar data points together. The main goal of clustering
is to identify meaningful patterns and structures in data sets, which can
help make better decisions and predictions.
In big data, clustering is particularly useful for processing and analyzing
large amounts of data that are too complex and diverse to be analyzed
manually. With the help of clustering algorithms, big data analysts can
automatically identify similarities and differences among data points and
group them into clusters or subgroups based on certain criteria.
Introduction
Types of clustering algorithms
Partitioning
K-means
Hierarchical
Agglomerative and
Divisive
Image Segmentation: is the classification of an image into
different groups, Each group has similar attributes.
It can group pixels with similar characteristics into clusters
or segments. This can be achieved using various clustering
algorithms, such as K means clustering, mean shift
clustering, hierarchical clustering , and fuzzy clustering .
Image Segmentation by Clustering
It is a widely used clustering algorithm for image segmentation. In
this approach, the pixels in an image are treated as data points, and
the algorithm partitions these data points into K clusters based on
their similarity. The similarity is measured using a distance metric.
The algorithm starts by randomly selecting K initial centroids, and
then iteratively assigns each pixel to the nearest centroid and
updates the centroids based on the mean of the assigned pixels.
This process continues until the centroids converge to a stable
value.
K Means
1. Choose the number of clusters you want to find which is k.
2. Randomly assign the data points to any of the k clusters.
3. Then calculate the center of the clusters.
4. Calculate the distance of the data points from the centers of each of the
clusters.
5. Depending on the distance of each data point from the cluster, reassign
the data points to the nearest clusters.
6. Again calculate the new cluster center.
7. Repeat steps 4,5 and 6 till data points don’t change the clusters, or till
we reach the assigned number of iterations.
How Does K-means clustering works?
Hierarchical clustering is a method of cluster analysis in
data mining that creates a hierarchical representation of the
clusters in a dataset. The method starts by treating each
data point as a separate cluster and then iteratively
combines the closest clusters until a stopping criterion is
reached. The result of hierarchical clustering is a tree-like
structure, called a dendrogram, which illustrates the
hierarchical relationships among the clusters.
What is Hierarchical Clustering?
● Agglomerative Clustering
● Divisive clustering
Types of Hierarchical Clustering
Initially consider every data point as an individual
Cluster and at every step, merge the nearest pairs
of the cluster. (It is a bottom-up method). At every
iteration, the clusters merge with different clusters
until one cluster is formed.
Agglomerative Clustering
Divisive Hierarchical clustering
We can say that Divisive Hierarchical clustering is precisely
the opposite of Agglomerative Hierarchical clustering. In
Divisive Hierarchical clustering, we take into account all of
the data points as a single cluster and in every iteration, we
separate the data points from the clusters which aren’t
comparable. In the end, we are left with N clusters.
Hierarchical clustering for image segmentation
To apply hierarchical clustering to image segmentation, you
need to represent each pixel or region of the image as a data
point, with features such as color, intensity, gradient, or
texture. Then, you need to define a similarity or distance
measure between the data points. Next, you need to apply a
linkage criterion to determine how to merge the data points
into clusters. Finally, you need to select a cut-off point or
threshold to obtain the final segmentation.
k-means clustering is faster and simpler, but requires
choosing the number of clusters beforehand and may not
capture complex structures. On the other hand, hierarchical
clustering is more flexible , but can be computationally
expensive and sensitive to outliers. Depending on your data
and your goals, you may prefer one method over the other,
or even combine them in a hybrid approach.
Which method is better between them?
Clustering algorithms Type in image segmentation .pptx

More Related Content

Similar to Clustering algorithms Type in image segmentation .pptx

Similar to Clustering algorithms Type in image segmentation .pptx (20)

Dataa miining
Dataa miiningDataa miining
Dataa miining
 
PPT s10-machine vision-s2
PPT s10-machine vision-s2PPT s10-machine vision-s2
PPT s10-machine vision-s2
 
26-Clustering MTech-2017.ppt
26-Clustering MTech-2017.ppt26-Clustering MTech-2017.ppt
26-Clustering MTech-2017.ppt
 
image_classification.pptx
image_classification.pptximage_classification.pptx
image_classification.pptx
 
Data mining and warehousing
Data mining and warehousingData mining and warehousing
Data mining and warehousing
 
CLUSTERING IN DATA MINING.pdf
CLUSTERING IN DATA MINING.pdfCLUSTERING IN DATA MINING.pdf
CLUSTERING IN DATA MINING.pdf
 
K means Clustering - algorithm to cluster n objects
K means Clustering - algorithm to cluster n objectsK means Clustering - algorithm to cluster n objects
K means Clustering - algorithm to cluster n objects
 
Hierarchical Clustering With KSAI
Hierarchical Clustering With KSAIHierarchical Clustering With KSAI
Hierarchical Clustering With KSAI
 
47 292-298
47 292-29847 292-298
47 292-298
 
My8clst
My8clstMy8clst
My8clst
 
Chapter 5.pdf
Chapter 5.pdfChapter 5.pdf
Chapter 5.pdf
 
Neural nw k means
Neural nw k meansNeural nw k means
Neural nw k means
 
Enhanced Clustering Algorithm for Processing Online Data
Enhanced Clustering Algorithm for Processing Online DataEnhanced Clustering Algorithm for Processing Online Data
Enhanced Clustering Algorithm for Processing Online Data
 
clustering ppt.pptx
clustering ppt.pptxclustering ppt.pptx
clustering ppt.pptx
 
UNIT - 4: Data Warehousing and Data Mining
UNIT - 4: Data Warehousing and Data MiningUNIT - 4: Data Warehousing and Data Mining
UNIT - 4: Data Warehousing and Data Mining
 
CLUSTER ANALYSIS ALGORITHMS.pptx
CLUSTER ANALYSIS ALGORITHMS.pptxCLUSTER ANALYSIS ALGORITHMS.pptx
CLUSTER ANALYSIS ALGORITHMS.pptx
 
Lec4 Clustering
Lec4 ClusteringLec4 Clustering
Lec4 Clustering
 
Machine learning session9(clustering)
Machine learning   session9(clustering)Machine learning   session9(clustering)
Machine learning session9(clustering)
 
Clustering in Machine Learning.pdf
Clustering in Machine Learning.pdfClustering in Machine Learning.pdf
Clustering in Machine Learning.pdf
 
Digital Image Classification.pptx
Digital Image Classification.pptxDigital Image Classification.pptx
Digital Image Classification.pptx
 

Recently uploaded

POGONATUM : morphology, anatomy, reproduction etc.
POGONATUM : morphology, anatomy, reproduction etc.POGONATUM : morphology, anatomy, reproduction etc.
POGONATUM : morphology, anatomy, reproduction etc.
Silpa
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
Silpa
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
Areesha Ahmad
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
MohamedFarag457087
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Sérgio Sacani
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
Areesha Ahmad
 

Recently uploaded (20)

PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICEPATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
 
POGONATUM : morphology, anatomy, reproduction etc.
POGONATUM : morphology, anatomy, reproduction etc.POGONATUM : morphology, anatomy, reproduction etc.
POGONATUM : morphology, anatomy, reproduction etc.
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
 
Velocity and Acceleration PowerPoint.ppt
Velocity and Acceleration PowerPoint.pptVelocity and Acceleration PowerPoint.ppt
Velocity and Acceleration PowerPoint.ppt
 
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
 
Chemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdfChemistry 5th semester paper 1st Notes.pdf
Chemistry 5th semester paper 1st Notes.pdf
 
Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)COMPUTING ANTI-DERIVATIVES(Integration by SUBSTITUTION)
COMPUTING ANTI-DERIVATIVES (Integration by SUBSTITUTION)
 
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)GBSN - Microbiology (Unit 1)
GBSN - Microbiology (Unit 1)
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
Conjugation, transduction and transformation
Conjugation, transduction and transformationConjugation, transduction and transformation
Conjugation, transduction and transformation
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Digital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptxDigital Dentistry.Digital Dentistryvv.pptx
Digital Dentistry.Digital Dentistryvv.pptx
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical Science
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 
Use of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxUse of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptx
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
 

Clustering algorithms Type in image segmentation .pptx

  • 2. ● Introduction ● Types of clustering algorithms ● Image Segmentation By clustering ● K Means ● How Does K-means clustering works? ● What is Hierarchical Clustering? ● Types of Hierarchical Clustering ● Which method is better between them? Topics
  • 3. A clustering algorithm is a popular technique in big data analytics that involves grouping similar data points together. The main goal of clustering is to identify meaningful patterns and structures in data sets, which can help make better decisions and predictions. In big data, clustering is particularly useful for processing and analyzing large amounts of data that are too complex and diverse to be analyzed manually. With the help of clustering algorithms, big data analysts can automatically identify similarities and differences among data points and group them into clusters or subgroups based on certain criteria. Introduction
  • 4. Types of clustering algorithms Partitioning K-means Hierarchical Agglomerative and Divisive
  • 5. Image Segmentation: is the classification of an image into different groups, Each group has similar attributes. It can group pixels with similar characteristics into clusters or segments. This can be achieved using various clustering algorithms, such as K means clustering, mean shift clustering, hierarchical clustering , and fuzzy clustering . Image Segmentation by Clustering
  • 6. It is a widely used clustering algorithm for image segmentation. In this approach, the pixels in an image are treated as data points, and the algorithm partitions these data points into K clusters based on their similarity. The similarity is measured using a distance metric. The algorithm starts by randomly selecting K initial centroids, and then iteratively assigns each pixel to the nearest centroid and updates the centroids based on the mean of the assigned pixels. This process continues until the centroids converge to a stable value. K Means
  • 7. 1. Choose the number of clusters you want to find which is k. 2. Randomly assign the data points to any of the k clusters. 3. Then calculate the center of the clusters. 4. Calculate the distance of the data points from the centers of each of the clusters. 5. Depending on the distance of each data point from the cluster, reassign the data points to the nearest clusters. 6. Again calculate the new cluster center. 7. Repeat steps 4,5 and 6 till data points don’t change the clusters, or till we reach the assigned number of iterations. How Does K-means clustering works?
  • 8.
  • 9. Hierarchical clustering is a method of cluster analysis in data mining that creates a hierarchical representation of the clusters in a dataset. The method starts by treating each data point as a separate cluster and then iteratively combines the closest clusters until a stopping criterion is reached. The result of hierarchical clustering is a tree-like structure, called a dendrogram, which illustrates the hierarchical relationships among the clusters. What is Hierarchical Clustering?
  • 10. ● Agglomerative Clustering ● Divisive clustering Types of Hierarchical Clustering
  • 11. Initially consider every data point as an individual Cluster and at every step, merge the nearest pairs of the cluster. (It is a bottom-up method). At every iteration, the clusters merge with different clusters until one cluster is formed. Agglomerative Clustering
  • 12.
  • 13. Divisive Hierarchical clustering We can say that Divisive Hierarchical clustering is precisely the opposite of Agglomerative Hierarchical clustering. In Divisive Hierarchical clustering, we take into account all of the data points as a single cluster and in every iteration, we separate the data points from the clusters which aren’t comparable. In the end, we are left with N clusters.
  • 14.
  • 15. Hierarchical clustering for image segmentation To apply hierarchical clustering to image segmentation, you need to represent each pixel or region of the image as a data point, with features such as color, intensity, gradient, or texture. Then, you need to define a similarity or distance measure between the data points. Next, you need to apply a linkage criterion to determine how to merge the data points into clusters. Finally, you need to select a cut-off point or threshold to obtain the final segmentation.
  • 16. k-means clustering is faster and simpler, but requires choosing the number of clusters beforehand and may not capture complex structures. On the other hand, hierarchical clustering is more flexible , but can be computationally expensive and sensitive to outliers. Depending on your data and your goals, you may prefer one method over the other, or even combine them in a hybrid approach. Which method is better between them?