1 / 35

אשכול - clustering

אשכול - clustering. Clustering הוא תחום הקשור לבינה מלאכותית , ותת תחום של למידה לא מבוקרת. Exp 2. Exp 3. כמה גן מבוטא בכל ניסוי. E 2. E 3. E 1. Gene 1. Gene 2. Exp 1. Gene N. איך בודקים דמיון פנימי בין שני נקודות. Peter. Piotr. 0.23. 3. 342.7. Norms. הגדרה יבשה של נורמה.

Download Presentation

אשכול - clustering

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 Clustering הוא תחום הקשור לבינה מלאכותית , ותת תחום של למידה לא מבוקרת .

  2. Exp 2 Exp 3 כמה גן מבוטא בכל ניסוי E 2 E 3 E 1 Gene 1 Gene 2 Exp 1 Gene N

  3. איך בודקים דמיון פנימי בין שני נקודות Peter Piotr 0.23 3 342.7

  4. Norms הגדרה יבשה של נורמה

  5. מרחק בין שני וקטורים מוגדר להיות נורמה מאיזשהו מימד בין שני הוקטורים

  6. הגדרות מרחק 1. Euclidean distance: D(X,Y)=sqrt[(x1-y1)2+(x2-y2)2+…(xn-yn)2] 2. (Pearson) Correlation coefficient R(X,Y)=1/n*∑[(xi-E(x))/x *(yi-E(y))/y] x= sqrt(E(x2)-E(x)2); E(x)=expected value of x R=1 if x=y 0 if E(xy)=E(x)E(y) 3. Norm 1 D(X,Y)=|x1-y1|+|x2-y2|+…|(xn-yn)| 4. Norm inf D(X,Y)=maxi(|xn-yn|)

  7. דמיון בין פרטים-מרחק בין וקטורים מגדירים וקטור המקבל פרמטרים על סמך מאפיינים קבועים מראש v=[dress color,earings,height,hair,weight] Patty =[ 3, 2, 1.7, 4, 65 ] Salma= [4 , 1, 1.7, 3 ,65 ] Marge=[5, 0, 1.6, 6, 60] || Patty-Salma||1 = 1+1+0+1+0 = 3 || Patty-Marge||1 = 2+2+0.1+2+5 = 11.1 || Salma-Marge||1 = 1+1+0.1+3+5 = 10.1 || Patty-Salma|| ∞= 1 || Patty-Marge|| ∞ = 5 || Salma-Marge|| ∞ = 5 מרחק זה נקרא מרחק עריכה edit distance

  8. דרכים למציאת דמיון בין פרטים מגדירים וקטור המקבל את ציון הדמיון על פי פרמטרים שאנחנו קובעים The distance between Patty and Selma שינוי צבע שמלה, 1 point שינוי צורת עגילים, 1 point שינוי בצורת השיער, 1 point 0 pointגובה שונה 0 point משקל שונה D(Patty,Selma) = 3 The distance between Marge and Selma. שינוי צבע שמלה, 1 point שינוי צורת עגילים, 1 point גובה שונה 0.1 point שינוי בצורת השיער 3 point משקל , 5 point D(Marge,Selma) = 10.1 מרחק זה נקרא מרחק עריכה edit distance

  9. Data Clustering

  10. איך מפרידים לקבוצות? Simpson's Family Females Males School Employees

  11. Partitional Clustering • Nonhierarchical, each instance is placed in exactly one of K nonoverlapping clusters. • Since only one set of clusters is output, the user normally has to input the desired number of clusters K.

  12. אלגוריתם k-means • קבע מס' מרכזים k באקראי / לא באקראי • שייך כל נקודה למרכז הקרוב אליה ע"פ פונקצית המרחק שהגדרת • קבע את הk החדש ע"פ מרכז הכובד של האשכול שנוצר • המשך עד להתכנסות המרכזים

  13. k3 k1 k2 K-means Clustering: Step 1 Algorithm: k-means, Distance Metric: Euclidean Distance 5 4 3 2 1 0 0 1 2 3 4 5

  14. k3 k1 k2 K-means Clustering: Step 2 Algorithm: k-means, Distance Metric: Euclidean Distance 5 4 3 2 1 0 0 1 2 3 4 5

  15. k3 k1 k2 K-means Clustering: Step 3 Algorithm: k-means, Distance Metric: Euclidean Distance 5 4 3 2 1 0 0 1 2 3 4 5

  16. k3 k1 k2 K-means Clustering: Step 4 Algorithm: k-means, Distance Metric: Euclidean Distance 5 4 3 2 1 0 0 1 2 3 4 5

  17. k1 k2 k3 K-means Clustering: Step 5 Algorithm: k-means, Distance Metric: Euclidean Distance

  18. E1 E2 E3 Hierarchical clustering

  19. אשכול היררכי Partitional Hierarchical

  20. Piotr Peter Piero Pedro Pyotr Pierre Pietro Petros How similar are the names “Peter” and “Piotr”? Assume the following cost function Substitution 1 Unit Insertion 1 Unit Deletion 1 Unit D(Peter,Piotr) is 3 Edit Distance Peter Piter Pioter Piotr Substitution (i for e) Insertion (o) Deletion (e)

  21. Pedro(Portuguese/Spanish) Petros (Greek), Peter (English), Piotr (Polish), Peadar (Irish), Pierre (French), Peder (Danish), Peka (Hawaiian), Pietro (Italian), Piero (ItalianAlternative), Petr (Czech), Pyotr (Russian) Piotr Peka Peter Pedro Piero Pyotr Peder Pierre Pietro Petros Peadar

  22. Pedro(Portuguese/Spanish) Petros (Greek), Peter (English), Piotr (Polish), Peadar (Irish), Pierre (French), Peder (Danish), Peka (Hawaiian), Pietro (Italian), Piero (ItalianAlternative), Petr (Czech), Pyotr (Russian) Piotr Peka Peter Pedro Piero Pyotr Peder Pierre Pietro Petros Peadar

  23. בניית -dendogram מרחק בין אשכולות • Single linkage (nearest neighbor): • המרחק בין האשכולות מוגדר על שני הנקודות הכי קרובות • Complete linkage (furthest neighbor): • המרחק בין האשכולות מוגדר על שני הנקודות הכי רחוקות • Group average linkage: • המרחק מוגדר להיות בין שני המרכזים (ממוצע של כל אשכול)

  24. 0 4 6 8 5 7 0 2 0 3 3 0 1 0 4 בניית DENDOGRAM D( , ) = 6 D( , ) = 1

  25. D( , )=2

  26. D( , )=3

  27. בונים את העץ מלמטה ועולים כלפי מעלה בחר את המרחק הקצר ביותר … בחר את המרחק הקצר ביותר … בחר את המרחק הקצר ביותר …

  28. הוספת נקודה של טעות לא תפגע באשכול הקודם Outlier

  29. דוגמא ממבחן(בשיעור) • אשכולות (clustering) • נתונות הנקודות המסומנות • בצע אשכול הררכי עם 2 אשכולות ועם 3 אשכולות • בצע k-means עם 2 אשכולות ועם 4 אשכולות • פרט את את שלבי אלגוריתם ה fuzzy – k mean

  30. Matlab….

  31. 0 1 1.5 2 5 6 7 9 1 0 2 1 6.5 6 8 8 1.5 2 0 1 4 4 6 5.5 . . . העברת הנק' לגרף • קבע את הנק' במישור • קבע מרחק בין כל זוג נקודות graph representation distance matrix n-D data points

  32. עץ פורש מינימאלי (MST) • קבע קודקוד מקור והכנס אותו לסט A (עץ) • מצא את הקודקוד בסט B (שאר הקודקודים בגרף) אשר הכי קרוב לעץ (A) • חזור על התהליך עד שלא ישארו קודקודים בסט B

  33. 4 4 4 4 7 7 7 4 5 3 3 8 7 10 5 (b) (c) (d) (e) 3 6 דוגמא (a)

  34. מציאת clustring • קבע את כיוון ההתקדמות בעץ (כל הוספה של צומת) בפונקציה של משקל הקשת שהוספה • כל "עמק" בגרף מייצג cluster

More Related