1 / 45

الجلسة الرابعة التحليل العنقودي Clustering Analysis تشرح لكل الفئات

جامعة تشرين كلية الهندسة الميكانيكية والكهربائية قسم هندسة الحاسبات والتحكم الآلي السنة الخامسة – الفصل الأول التعرف على النماذج – عملي. الجلسة الرابعة التحليل العنقودي Clustering Analysis تشرح لكل الفئات. إعداد مهندسو العملي محمد كفا – وسيم أحمد – بهاء هاشم. outlines. Clustering

sheera
Télécharger la présentation

الجلسة الرابعة التحليل العنقودي Clustering Analysis تشرح لكل الفئات

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. جامعة تشرين كلية الهندسة الميكانيكية والكهربائية قسم هندسة الحاسبات والتحكم الآلي السنة الخامسة – الفصل الأول التعرف على النماذج – عملي الجلسة الرابعةالتحليل العنقوديClustering Analysisتشرح لكل الفئات إعداد مهندسو العملي محمد كفا – وسيم أحمد – بهاء هاشم

  2. outlines • Clustering • Clustering vs. classification • proximity matrix • clustering algorithm • partition clustering • k means • Hierarchical clustering • agglomerative approach

  3. Classification vs. clustering • Clustering • Unsupervised learning • Unknown classes • Classification • Supervised learning • Known classes • Differences only in training stage • The goal for both is to classify a new pattern to a group

  4. Terms • Sample : Value , 2D , 3D , N-Dimensions • Student1 : 77 , student2 : 89 • Student1 : (66,67) , student2 : (87,97) • Sample = pattern – object – observation – item

  5. proximity matrix • One dimension samples

  6. proximity matrix • 2 Dimensions samples

  7. proximity matrix using MATLAB • Y = pdist(x,parameter) • z = squareform(Y) • X = [25 11;33 11;34 13;35 18]; • y = pdist(X,'euclidean') • y = 8.0000 9.2195 12.2066 2.2361 7.2801 5.0990 • z = squareform(y)

  8. k-means clustering • k is the number of clusters

  9. K-means clusteringNumeric Example • We want to cluster these four samples\objects into two groups using k means algorithm. • Notes : • Two clusters … so we have k = 2 • K = 2 … so we can start with two centoid

  10. K-means clusteringNumeric Example • plot samples!

  11. K-means clusteringNumeric Example • First step : arbitrary centriods • c1 = (1,1) c2 = (2,1)

  12. K-means clusteringNumeric Example • Euclidean distance between each sample and centroids c1 = (1,1) , c2 = (2,1)

  13. K-means clusteringNumeric Example • Iter 1 : computing New centroids • c1 = (1,1)

  14. K-means clusteringNumeric Example • iter 1 : Euclidean distance between each sample and centroids c1 = (1,1) , c2 = (11/3,8/3)

  15. K-means clusteringNumeric Example • iter 2 : Computing new centroids

  16. K-means clusteringNumeric Example • iter 1 : Euclidean distance between each sample and centroids c1(1.5,1) , c2(4.5,3.5)

  17. K-means clusteringNumeric Example

  18. k-means clustering using MATLAB • Matlab Statistical Toolbox • [IDX,C] = kmeans(X,k)

  19. Hierarchical Clustering • dendrogram

  20. Hierarchical Clustering • cutoff point : to produce custom clusters

  21. Hierarchical Clustering • agglomerative approach • divisive approach

  22. Agglomerative Hierarchical Clustering

  23. Agglomerative Hierarchical ClusteringNumeric Example • run agglomerative Hierarchical Clustering on this Data set.

  24. Agglomerative Hierarchical ClusteringNumeric Example • first step: Compute distance matrix (Euclidean distance)

  25. Agglomerative Hierarchical ClusteringNumeric Example • second step : Compute Linkages between groups • Single Linkage Complete linkage • average group centroid cretria

  26. Agglomerative Hierarchical ClusteringNumeric Example • distance(D,F) = 0.5 (the minimum) • five groups : A , B , C , (D,F) , E

  27. Agglomerative Hierarchical ClusteringNumeric Example • recompute distance matrix for the five groups

  28. Agglomerative Hierarchical ClusteringNumeric Example

  29. Agglomerative Hierarchical ClusteringNumeric Example • distance(A,B) = 0.71 (the minimum) • four groups : (A,B) , C , (D,F) , E

  30. Agglomerative Hierarchical ClusteringNumeric Example

  31. Agglomerative Hierarchical ClusteringNumeric Example

  32. Agglomerative Hierarchical ClusteringNumeric Example • distance((D,F),E) = 1.00 (the minimum) • three groups: (A,B) , C , ((D,F),E)

  33. Agglomerative Hierarchical ClusteringNumeric Example

  34. Agglomerative Hierarchical ClusteringNumeric Example • distance( C, ((D,F),E) ) = 1.41 (the minimum) • two groups: (A,B) , ((C, ((D,F),E))

  35. Agglomerative Hierarchical ClusteringNumeric Example

  36. Agglomerative Hierarchical ClusteringNumeric Example • Dendrogram : minumu distances in each step are : 0.5 , 0.71 , 1 , 1.41 , 2.5

  37. Agglomerative Hierarchical ClusteringNumeric Example

  38. Agglomerative Hierarchical Clusteringusing MATLAB

  39. وظائف اختيارية • ملاحظة 1: الطالب الذي يقدم الوظيفة يقوم بمقابلة مدتها 5 دقائق لشرح وظيفته باختصار. • ملاحظة 2:الطالب الذي يقدم وظيفة أو أكثر من الوظائف المعروضة في المحاضرة يتم مقابلته مع أحد مهندسي العملي لمدة 5 دقائق يشرح فيها الحل\الاجابة وله ثلاث علامات تضاف لعلامته في المذاكرة أو الامتحان.

  40. وظيفة 1 • وظيفة 1 : اكتب مجموعة التعليمات البرمجية (بلغة الماتلاب) والتي من خلالها نستطيع تحديد نقطة قطع cutoff مناسبة وعدد المجموعات\العناقيد المطلوبة. • write matlab code to applying cutoff point on resulting dendrogram to get the clusters.

  41. وظيفة 2 • وظيفة 2 : تقديم حلقة بحث عن التحليل العنقودي التجميعي divisive Hierarchical Clustering (مدعمة بمثال عددي). (تقدم باللغة العربية بعد ترجمتها في حال كان المصدر أجنبيا)

  42. وظيفة 3 • وظيفة 3 : تحقيق خوارزمية k means بكود برمجي بلغة matlab أو أي لغة برمجة شهيرة (C++ , C# , VB , Java …).

  43. وظيفة 4 • وظيفة 4 : تحقيق خوارزمية agglomerative Hierarchical clustering بكود برمجي بلغة matlab أو أي لغة برمجة شهيرة (C++ , C# , Java …)

  44. وظيفة 5 • وظيفة 5 : تقديم حلقة بحث عن العنقدة باستخدام خوارزمية k means clusteringباستخدام برنامج Excel من شركة مايكروسوفت.

  45. وظيفة 6 • وظيفة 6 : تقديم حلقة بحث عن العنقدة باستخدام خوارزمية k means clustering باستخدام برنامج R project an opensource (free) statistical computing software.

More Related