Clustering Techniques in Data Science

clustering n.w
1 / 24
Embed
Share

Explore the complexities of clustering in data science through hierarchical and K-means clustering methods, along with insights on different clustering approaches such as agglomerative techniques. Learn about the challenges and best practices for determining the optimal number of clusters for successful data analysis.

  • Data Science
  • Clustering Techniques
  • Hierarchical Clustering
  • K-means
  • Agglomerative Methods

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Clustering Patrice Koehl Department of Biological Sciences National University of Singapore http://www.cs.ucdavis.edu/~koehl/Teaching/BL5229 koehl@cs.ucdavis.edu

  2. Clustering is a hard problem Many possibilities; What is best clustering ?

  3. Clustering is a hard problem 2 clusters: easy

  4. Clustering is a hard problem 4 clusters: difficult ? ? Many possibilities; What is best clustering ?

  5. Clustering Hierarchical clustering K-means clustering How many clusters?

  6. Clustering Hierarchical clustering

  7. Hierarchical Clustering To cluster a set of data D={P1, P2, ,PN}, hierarchical clustering proceeds through a series of partitions that runs from a single cluster containing all data points, to N clusters, each containing 1 data points. Two forms of hierarchical clustering: Agglomerative a, b, c, d, e c, d, e a, b d, e Divisive c d a b e

  8. Agglomerative hierarchical clustering techniques Starts with N independent clusters: {P1}, {P2}, ,{PN} Find the two closest (most similar) clusters, and join them Repeat step 2 until all points belong to the same cluster Methods differ in their definition of inter-cluster distance (or similarity)

  9. Agglomerative hierarchical clustering techniques Cluster A 1) Single linkage clustering Distance between closest pairs of points: { d } = ( , ) min ( , ), , d A B P P P A P B Cluster B i j i j Cluster A 2) Complete linkage clustering Distance between farthest pairs of points: { d } Cluster B = ( , ) max ( , ), , d A B P P P A P B i j i j

  10. Agglomerative hierarchical clustering techniques Cluster A: NA elements 3) Average linkage clustering Mean distance of all mixed pairs of points: ( , ) d P P i j P A P B = Cluster B: NB elements ( , ) d A B i j N N A B 4) Average group linkage clustering Cluster A Cluster T Mean distance of all pairs of points = ( , ) d P P i j P T P T ( , ) d A B i j 2 T N Cluster B

  11. Clustering K-means clustering

  12. K-means clustering (http://www.weizmann.ac.il/midrasha/courses/)

  13. K-means clustering (http://www.weizmann.ac.il/midrasha/courses/)

  14. K-means clustering (http://www.weizmann.ac.il/midrasha/courses/)

  15. K-means clustering (http://www.weizmann.ac.il/midrasha/courses/)

  16. K-means clustering (http://www.weizmann.ac.il/midrasha/courses/)

  17. Clustering How many clusters?

  18. Cluster validation Clustering is hard: it is an unsupervised learning technique. Once a Clustering has been obtained, it is important to assess its validity! The questions to answer: Did we choose the right number of clusters? Are the clusters compact? Are the clusters well separated? To answer these questions, we need a quantitative measure of the cluster sizes: intra-cluster size Inter-cluster distances

  19. Inter cluster size Several options: Single linkage Complete linkage Average linkage Average group linkage

  20. Intra cluster size For a cluster S, with N members and center C: Several options: -Complete diameter: -Average diameter: -Centroid diameter:

  21. Cluster Quality For a clustering with K clusters: 1) Dunn s index Large values of D correspond to good clusters 2) Davies-Bouldin s index Low values of DB correspond to good clusters

  22. Cluster Quality: Silhouette index Define a quality index for each point in the original dataset: For the ith object, calculate its average distance to all other objects in its cluster. Call this value ai. For the ith object and any cluster not containing the object, calculate the object s average distance to all the objects in the given cluster. Find the minimum such value with respect to all clusters; call this value bi. For the ith object, the silhouette coefficient is b(i) -a(i) max a(i),b(i) ( s(i) = )

  23. Cluster Quality: Silhouette index Note that: -1 s(i) 1 s(i) = 1, i is likely to be well classified s(i) = -1, i is likely to be incorrectly classified s(i) = 0, indifferent

  24. Cluster Quality: Silhouette index Cluster silhouette index: N S(Xi) =1 s(j) N j=1 Global silhouette index: N GS =1 S(Xi ) K i=1 Large values of GS correspond to good clusters

More Related Content