1 / 39

DSS 第九組期末報告 7.4 P.401~P.408

DSS 第九組期末報告 7.4 P.401~P.408. 組員: 93156204 盧宗佑 93156206 王雅玲 93156208 許韶玲 93156219 詹伯為. DSS 第九組期末報告. 7-4 Partitioning Methods. DSS 第九組期末報告. 目錄. Cluster Partitional clustering algorithm Partitioning algorithm K-Means K-Medoids 大型資料庫處理 綜合比較 總結. 目錄. Cluster

kaili
Download Presentation

DSS 第九組期末報告 7.4 P.401~P.408

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. DSS第九組期末報告7.4 P.401~P.408 組員:93156204 盧宗佑 93156206 王雅玲 93156208 許韶玲 93156219 詹伯為 DSS第九組期末報告

  2. 7-4 Partitioning Methods DSS第九組期末報告

  3. 目錄 • Cluster • Partitional clustering algorithm • Partitioning algorithm • K-Means • K-Medoids • 大型資料庫處理 • 綜合比較 • 總結

  4. 目錄 • Cluster • Partitional clustering algorithm • Partitioning algorithm • K-Means • K-Medoids • 大型資料庫處理 • 綜合比較 • 總結

  5. CLUSTER介紹 目的: 將相似的事物歸類。可以將變數分類,在同一個cluster中的變數相對於其他變數來說是相同、相似或是同質的;而與其他cluster中的變數則有顯著的差異或是異質性。 應用:檢驗某種相互依存關係 顧客間特性的相似或是差異關係;透過將顧客特性進一步分割成若干類別而達到市場區隔之目的。 DSS第九組期末報告

  6. CLUSTER的形成 DSS第九組期末報告

  7. 目錄 • Cluster • Partitional clustering algorithm • Partitioning algorithm • K-Means • K-Medoids • 大型資料庫處理 • 綜合比較 • 總結

  8. Partitional clustering algorithm 集群分析演算法,不需要事先知道資料該分成幾個已知的 類型,而可以依照資料間彼此的相關程度來完成分類分群 的目的。 可概分: 分割演算法 (Partitioning Algorithm) 階層演算法 (Hierarchical Algorithm) 密度型演算法 (Density-Based Algorithm)

  9. Partitioning algorithm 資料由使用者指定分割成K個集群群組。每一個分割 (partition)代表一個集群(cluster),集群是以最佳化分 割標準 (partitioning criterion) 為目標,分割標準的目標函數又稱為相似函數 (similarity function)。因此,同一集群的資料物件具有相類似的屬性。 最常見的是K-Means及K-Medoids兩種。此兩種方法是屬 於啟發式 (heuristic),是目前使用相當廣泛的分割演算法。

  10. 目錄 • Cluster • Partitional clustering algorithm • Partitioning algorithm • K-Means • K-Medoids • 大型資料庫處理 • 綜合比較 • 總結

  11. K-MEANS簡介 1967年由學者J.B.MacQueen 所提出,也是最早的組 群化計算技術。 一種常被使用的集群演算法,在最初不知道數據的分類 時,可採用K-means把數據聚成不同的集群,使得同一 集群內的紀錄彼此相似度高,和不同集群的紀錄相似度 低。 特性:簡單易於使用 適用:球體形狀 (spherical-shaped)、中小型資料庫 的data mining

  12. K-MEANS 的性質 把收集的資料分割成k個子集合,每一個子集合為一個群集(cluster) 以集群內各物件的平均值為集群的中心點 必須要選定k的值 起始選定的不同的k個值可能會影響結果 需重複執行一系列步驟 分批處理新的執行情況

  13. K-MEANS演算步驟 Input: K-集群的個數 D-含n個資料的資料集 Output:K個集群的資料集 Method: 任意從n個資料物件中選取K個物件當作起始集群的中心 重複步驟1 對於所有的n個物件,一一找其最近似的集群中心 (一般是以距離近者相似度較高),然後將該物件歸到最近似的集群

  14. K-MEANS演算步驟 4. 根據步驟3的結果重新計算各個集群的中心點 (計算每一個群聚(cluster) 裡的新平均數) 5. 重複步驟二到三,直到所設計的停止條件發生 一般是以沒有任何物件變換所屬集群為停止絛件(代表分 群結果已經穩定不變),也就是所謂的 square-error criterion(減小每個群聚中,每一點與群中心的距離平方 誤差): mi代表集群i的中心,p是集群i內的物件,Ci則代表集群i

  15. EXAMPLE:1. 6 INSTANCES, 2 ATTRIBUTES, 2 CLUSTERS2. RANDOMLY SELECT INSTANCE 1&3 IN INITIAL

  16. K-means Complexity • K-means 演算法 企圖找出K個分割,使得square error function 縮到最小 • 當今天clusters較緊密時,效率會來的比clusters較鬆散時來的好. • 這個method的時間複雜度為O(nkt),n表示object數,k表示cluster數,t表示iteration數(k<<n , t<<n) • 這個method通常最理想的情形是在local做結束.

  17. K-MEANS 的缺點 • k-平均法在概念與實作上相當的簡單,且在處理大量資料時相當有擴充性 (scalable) 且有效率,但是卻也存在一些缺點 • 無法處理類別性資料維度 • 容易受雜訊與偏移值影響其群集中心 • 起始群集中心選擇上的影響 • 群集數量決定上的困難

  18. 不同種類的K-MEANS • 1.Hierarchical agglomeration • Determines the number of cluster and finds an initial clustering , and the then use iterative relocation to improve the clustering.

  19. 不同種類的K-MEANS(續) • 2.K-modes • Extend the k-means paradigm to cluster categorical data by replacing the means of cluster with modes. using new dissimilarity measure. • Using new dissimilarity measures to deal with categorical object and a frequency-based method to update modes of clusters.

  20. 不同種類的K-MEANS(續) • 3.EM(Expectation-Maximization) • Each object is assigned to each cluster according to a weight representing its probability of membership.

  21. 目錄 • Cluster • Partitional clustering algorithm • Partitioning algorithm • K-Means • K-Medoids • 大型資料庫處理 • 綜合比較 • 總結

  22. K-medoids method • k-物件法的概念 • 改善k-平均法因質量中心所造成無法處理類別性資料和容易受偏移值影響的問題 • k-物件法則使用位於每一群中最中心的資料點當作該群集中心 • k-物件法在運作上與k-平均法相似,最大的不同是每回合最多只改變一個群集中心,且此變動必須是能使準則函數值E下降

  23. Absolute-error criterion • E為所有absolute error的加總 • Cj表示cluster • P表示在Cj內的點 • Mi表示代表Cj內的object

  24. k-Medoids k-物件法的概念 改善k-平均法因質量中心所造成無法處理類別性資料和容易受偏移值影響的問題 k-物件法則使用位於每一群中最中心的資料點當作該群集中心 k-物件法在運作上與k-平均法相似,最大的不同是每回合最多只改變一個群集中心,且此變動必須是能使準則函數值E下降 分割環繞物件法(Partitioning Around Medoids, PAM)

  25. PAM • PAM演算法由 Kaufman and Rousseeuw 所提出 • K-means是計算叢聚的平均數來決定中心點,而平均值易受離群值的影響而扭曲 • 可以使用medoid來取代mean • 在每一個叢聚中實際最靠近中心的資料 • 選擇中心時,不再是隨機選取,而是選擇較具代表性的個 點

  26. PAM PAM演算法將全部物件分群成k個群組 為每個群組決定一個代表物件(representative objects),此代表物件稱之為medoid 依據相似度來決定非medoid物件是屬於那一個群組,其相似度是以物件彼此之間的距離(Euclidean distance)來表示,d(Oa, Ob)表示物件Oa與Ob之間的距離。 例如Oi為medoid,而Oj為非medoid物件,如果d(Oj,Oi)=min{d(Oj, Oe)}, Oe表示所有的medoids,則Oj歸屬於Oi群組。

  27. PAM 對任一個非medoid物件Oj,當一個medoid Oi被一個非medoid物件Oh取代時,所造成的改變成本Cjih定義如下:Cjih= d(Oj, Om) – d(Oj, On) 以 Oh取代 Oi成為medoid 之後,所造成的總改變成本為:TCih= Cjih 若TCih>0時,表示以Oh取代Oi之後的總距離比取代前大,則Oi將不會被Oh所取代。以TCih為衡量依據

  28. K-物件法 分割環繞物件法(PAM)的運作過程 輸入:一資料集合以及使用者定義之群集數量k 輸出:k個互不交集的群集 步驟 1:隨機從資料集合選擇任k個資料點當作起始k群的中心點 步驟 2:利用相似度計算公式,將資料點分別歸屬到距其最近之群集中心,形成k個群集 步驟 3:由資料集合中任選一非群集中心之資料點,並取代任一選取之群集中心,並計算距離總偏移值E 步驟 4:假如取代後所求得之距離總偏移值E下降,取代就成立,同時回到步驟2展開下一個群集中心取代的動作 步驟 5:如果所有非群集中心之資料點都無法取代已存在之群集中心,則結束此處理程序並輸出各群結果

  29. 目錄 • Cluster • Partitional clustering algorithm • Partitioning algorithm • K-Means • K-Medoids • 大型資料庫處理 • 綜合比較 • 總結

  30. 大型資料庫的處理 • K-medoids、PAM → 適合小型資料集 →無法處理大型資料庫 • 解決辦法 → CLARA (Clustering LARge Application) • CLARA:取樣 → 隨機、接近原始資料applies PAM • 複雜度:O(ks^2+k(n-k))

  31. best sampled CLARA -- 效率 • 由取樣大小決定 • PAM → 利用完整資料集CLARA → 利用取樣資料集盲點:取樣範圍不包含最佳解 Trade-off

  32. CLARA 改良 • 解決:CLARANS (Clustering Large Application based upon RANdomized Search) • 運用graph • 考慮鄰近節點 • 不侷限於區域性 • 複雜度:O(n^2) → 缺點

  33. 目錄 • Cluster • Partitional clustering algorithm • Partitioning algorithm • K-Means • K-Medoids • 大型資料庫處理 • 綜合比較 • 總結

  34. 綜合比較 精確度 速度

  35. 目錄 • Cluster • Partitional clustering algorithm • Partitioning algorithm • K-Means • K-Medoids • 大型資料庫處理 • 綜合比較 • 總結

  36. 總結 • Supervised clustering method → 必須知道K • 類別內部相似度↑↑,類別間相似度↓↓ • 找尋規則 • 不足:未知、未決定的分群數 → supervised clustering method

  37. 資料來源 • 國立台中教育大學教育測驗統計研究所理學碩士論文--以無參數的分散量為基礎的k最近鄰分類器,何省華 撰 • http://vega.cs.tku.edu.tw/~cyh/data_mining/F7899-Ch06.ppt群集分析 • bidm.stat.fju.edu.tw:81/STATISTICA-WEBCAST/STATISTICA-DM/DM方法1/K-Means%20Cluster.ppt • http://mathworld.wolfram.com/K-MeansClusteringAlgorithm.html -- wolfram mathworld

More Related