劉闖+陳桂芬
摘要:聚類分析是機器學習中重要的方法,傳統(tǒng)的K-means算法對于聚類的初始中心點的選擇具有隨機性,這就造成不同的選擇產(chǎn)生不同的聚類結果。針對這一問題,提出一種基于密度最大值的優(yōu)化初始聚類中心選取算法。試驗結果顯示,改進后的算法與傳統(tǒng)算法相比具有較高的穩(wěn)定性和可靠性。
關鍵詞:聚類;穩(wěn)定性;局部密度;可靠性
中圖分類號:TP393 文獻標識碼:A 文章編號:1007-9416(2017)11-0118-02
1 引言
聚類算法是數(shù)據(jù)挖掘中一種重要的算法,K-means聚類算法思路簡單,聚類快速。但是,其缺點也是十分明顯,易受噪聲影響,容易陷入局部最優(yōu)解。為解決傳統(tǒng)K-means聚類算法問題,很多學者從不同角度提出改進算法。文獻[1]根據(jù)密度和平均距離完成聚類中心的優(yōu)化,文獻[2]選擇相互距離最遠的K個處于高密度區(qū)域的點作為中心。文獻[3]選擇平均密度優(yōu)化初始聚類中心。綜合各個改進思想,提出基于密度最大值初始聚類中心的K-means算法。
4 仿真實驗分析
為驗證改進算法的有效性,采用國際上的專門用來測試機器學習算法的UCI數(shù)據(jù)集中Iris、Wine、Soybean這三組數(shù)據(jù)進行測試。Iris數(shù)據(jù)有950條數(shù)據(jù),每個數(shù)據(jù)對象有4個屬性,分三類;Wine數(shù)據(jù)750條數(shù)據(jù),每個數(shù)據(jù)13屬性,分三類;Soybean數(shù)據(jù)500條,每個數(shù)據(jù)對象35個屬性,分7類。測試實驗結果如表1,表2所示。
由表1,表2實驗對比結果可知改進后算法在迭代次數(shù),平方誤差,測試時間,準確率等方面對比傳統(tǒng)K-means算法,由表可知,改進后算法準確率明顯高于其他兩種算法。
5 結語
對于提出基于密度最大值初始化聚類中心的K-means算法,通過實驗對比表明,算法迭代次數(shù)和聚類所需時間減小,準確率提高。
參考文獻
[1]王浩,黃越.基于距離測度學習的AP聚類圖像標注[J].計算機工程與應用,2016:43-46.
[2]孫士保,秦克云.改進的k-平均聚類算法研究[J].計算機工程,2014:57-62.
[3]邢長征.基于平均密度優(yōu)化初始聚類中心的K-means算法[J].計算機應用工程,2014:56-59.
[4]Han Jiawei.Data mining:concepts and techniques[M].San Francisco:Morgan Kaufmann Publishers,2014:32-35.
Abstract:Clustering analysis is an important method in machine learning. The traditional K-means clustering algorithm has randomness to the initial central point of clustering, which leads to different choices to produce different clustering results. In response to this problem, an optimal initial clustering center selection algorithm based on maximum density is proposed. Compared with the standard data UCI, the experiment shows that the improved algorithm has higher stability and reliability than the traditional algorithm.
Key Words:Clustering;stability;local density;reliabilityendprint