1、电气信息工程学院外文栩译英文名称:Dataminingc1.us1.crinf译文名称:数据挖掘一聚类分析专业X白动化姓名:竺*班级学号:U指导教师:译文出处:Datamining:IanH.Witten.EibeFrank著二。一。年四月二十六日C1.ustering5.1 INTRODUCTIONC1.usteringissimi1.artoc1.assificationinthatdataaregrouped.However,un1.ikec1.assification,thegroupsarenopredefined.Instead,thegroupingisaccomp1.ished
2、byI1.iuiingsimi1.aritiesbetweendataaccording(ocharacteristicsIbundintheactua1.data.Thegroupsareca1.1.edc1.usters.Someauthorsviewc1.usteringasaspecia1.typeofc1.assication.Inthistext,however.WCIb1.1.owamoreconventiona1.viewinthatthetwoarcdifferent.Manydefinitionsforc1.ustershavebeenproposed: Setof1.ik
3、ee1.enents.E1.ementsfromdifferentc1.ustersarenota1.ike. Thedistancebetweenpointsinac1.usteris1.esshanthedistancebetweenapointinthec1.usterandanypoinoutsideit.Atermsimi1.artoc1.usteringisdatabasesegmentation,where1.iketup1.e(record)inadatabasearegrouped(ogether.T1.usisdonetopartitionorsegmentIhedatab
4、aseintocomponentsthatthengivetheuseramoregenera1.viewofthedata.In(hiscasetext,wcdonotdifferentiatebetweenSCgnwntationandc1.ustering.Asimp1.eexamp1.eofc1.usteringisfoundinExamp1.e5.1.Thisexamp1.ei1.1.ustratesthefactthatthatdetermininghowtodothec1.usteringisnotstraightforward.Asi1.1.ustratedinFigure5.
5、1.agivensetofdatamaybec1.usteredondifferentattributes.Hereagroupofhomesinageographicareaisshown.Thefirstf1.oortypeofc1.usteringisbasedonthe1.oca1.ionofthehome.Homesthataregeographica1.1.yc1.osetoeachotherarec1.usteredtogeher.Inthesecondc1.ustering,homesaregroupedbasedontesizeofthehouse.C1.usteringha
6、sbeenusedinmanyapp1.icationdomains,inc1.udingbio1.ogy,medicine,anthropo1.ogy,marketing,andeconomics.C1.usteringapp1.icationsinc1.udep1.antandanima1.c1.assification,diseasec1.assification,imageprocessing,patternrecognition,anddocUmCn1.retrieva1.Oneofthefirstdomainsinwhichc1.usteringwasusedwasbio1.ogi
7、ca1.taxonomy.Recentusesinc1.udeexaminingWeb1.ogdatatodetectusagepatterns.Whenc1.usteringisapp1.iedtoarea1.wor1.ddatabase,manyinterestingprob1.emsoccur: Ou1.1.ierhand1.ingisditrcu1.t.Herethee1.enensdonotnatura1.1.yfa1.1.intoanyc1.uster.Theycanbeviewedasso1.itaryc1.usters.However,ifac1.usteringa1.gori
8、thmattemptstofind1.argerc1.usters,theseout1.ierswi1.1.beforcedtobep1.acedinsomec1.uster.Thisprocessmayresu1.tinthecreationofPOOrc1.ustersbycombiningtwoexistingc1.ustersand1.eavingtheout1.ierinitsownc1.uster. Dynamicdatainthedatabaseimp1.iesthatc1.ustermembershipmaychangeovertime. Interpretingthesema
9、nticmeaningofeachc1.ustermaybedifficu1.t.Withc1.assification,the1.abe1.ingofthec1.assesisknownaheadof1.ime.However,withc1.ustering,thismaynotbethecase.Thus,whenthec1.usteringprocessfinishescreatingasetofc1.usters,theexactmeaningofeachc1.ustermaynotbeobvious.Hereiswhereadomainexpertisneededtoassigna1
10、abe1.orinterpretationforeachc1.uster. Thereisnoonecorrectanswertoac1.usteringprob1.em.Infact,manyanswersmaybefound.Theexactnumberofc1.ustersrequiredisnoteasytodetermine.Again,adomainexpertmayberequired.Forexamp1.e.SUPPoSewehaveasetofdataaboutp1.antsthathavebeenco1.1.ectedduringafie1.dtrip.Withoutan
11、ypriorknow1.edgeofp1.antc1.assification,ifweattempttodividethissetofdataintosimi1.argroupings,itwou1.dnotbec1.earhowmanygroupsshou1.dbecreated. Anotherre1.atedissueiswhatdatashou1.dbeusedOfc1.ustcring.Un1.ike1.earningduringac1.assificationprocess,wherethereissomeaprioriknow1.edgeconcerningwhattheatt
12、ributesofeachc1.assificationshou1.dbe.inc1.usteringwehavenosupervised1.earningtoaidtheprocess.Indeed,c1.usteringcanbeviewedassimi1.artounsupervised1.earning.WecanthensummarizesonebasicfeaturesOfc1.usiering(asopposedtoc1.assification): The(best)numberofc1.ustersisnotknown. Theremaynotbeanyaprioriknow
13、1.edgeconcerningthec1.usters. C1.usterresu1.tsarcdynamic.Thec1.usteringprob1.emisstatedasshowninDefinition5.1.Hereweassumethatthenumberofc1.usterstobecreatedisaninputva1.ue,k.Theactua1.content(andinterpretation)ofeachc1.uster.1jk.isdeterminedasaresu1.tofthefunctiondefinition.Without1.ossofgenera1.it
14、y,wewi1.1.viewthattheresu1.tofso1.vingac1.usteringprob1.emisthatasetofc1.ustersiscreated:K=ki.k2.ki).DEFINITION5.!.GivenadatabaseD=t1.,t2,.,tnoftup1.esandanintegerva1.uek,thec1.usteringprob1.emistodefineamappingfiD1,.jIwhereeacht1.isassignedtoonec1.usterKi,jk.Ac1.usterK,containsprecise1.ythosetup1.e
15、smappedtoi(;(hatis.K,=t,/(1)=Af,1.in,andt1.eD.Ac1.assificationofthedi-erenttypesofc1.usteringa1.gorithmsisshowninFigure5.2.C1.usteringa1.gorithmsthemse1.vesmaybeviewedashierarchica1.orpartitiona1.Withhierarchica1.c1.ustering,anestedsetofc1.ustersiscreated.Each1.eve1.inthehierarchyhasaseparateSCtofc1
16、usters.Atthe1.owest1.eve1.,eachitemisinitsownuniquec1.uster.Atthehighest1.eve1.,a1.1.itemsbe1.ongtothesamec1.uster.Withhierarchica1.c1.us1.ering,thedesirednumberofc1.ustersisnotinput.Withpa11iiiona1.c1.ustering,thea1.gorithmcreateson1.yonesetofc1.usters.Theseapproachesusethedesirednumberofc1.usters
17、todrivehowthefina1.setiscreated.Traditiona1.c1.usteringa1.gorithmstendtobetargetedtosma1.1.numericdatabasethatfitintomemory.Thereare.however,morerecentc1.usteringa1.gorithmsthat1.ookatcategorica1.dataandaretargetedto1.arger,PerhaPSdynamic,databases.A1.gorithmstargetedto1.argerdatabasesmayadapttomemo
18、ryconstraintsbyeithersamp1.ingthedatabaseorusingdatastructures,whichcanbecompressedorPrUnCdtofitintomemoryregard1.essofthesizeofthedatabase.C1.usteringa1.gorithmsmaya1.sodifferbasedonwhethertheyproduceover1.appingorIionovcr1.appingc1.usters.Eventhoughweconsideron1.ynonovcr1.appingc1.usters,itispossi
19、b1.etop1.aceaniteminmu1.tip1.ec1.usters.Inturn,nonovcr1.appingc1.usterscanbeviewedasextrinsicorintrinsic.Extrinsictechniquesuse1.abe1.ingoftheitemstoassistinthec1.assificationprocess.Thesea1.gorithmsarethetraditiona1.c1.assificationsupervised1.earninga1.gorithmsinwhichaspecia1.inputtrainingsetisused
20、Intrinsica1.gorithmsdonotuseanyapriorica(egor1.abe1.s,butdependon1.yontheadjacencymatrixcontainingthedistancebetweenobjects.A1.1.a1.gorithmsweexamineinthischapterfa1.1.intotheintrinsicc1.ass.Thetypesofc1.usteringa1.gorithmscanbefurtheredc1.assifiedbasedontheimp1.ementationtechniqueused.Hierarchica1
21、a1.gorithmscanbecategorizedasagg1.omeativeordivisive.Agg1.omerativeimp1.iesthatthec1.ustersarecreatedinabottom-upfashion,whi1.edivisivea1.gorithmsworkinatop-downfashion,1.thoughbothhierarchica1.andartitiona1.a1.gorithmscou1.dbedescribedusingtheagg1.onerativevs.divisive1.abe1.,ittypica1.1.yismoreass
22、ociatedwithhierarchica1.a1.gorithms.Anotherdescriptivetagindicateswhethereachindividua1.C1.CmCntishand1.edonebyone,seria1.(sometimesca1.1.edincrementa1.),orwhethera1.1.itemsarcexaminedtogether,simu1.taneous.Ifaspecifictup1.eisviewedashavingattributeva1.uesfora1.1.attributesintheschema,thenc1.usterin
23、ga1.gorithmscou1.ddifferastohowtheattributeva1.uesarcexamined.Asisusua1.1.ydonewithdecisiontreec1.assificationtechniques,somea1.gorithmsexamineattributeva1.uesoneatatime,monothetic.Po1.ythetica1.gorithmsconsidera1.1.attributeva1.uesatonetime.Fina1.1.y,c1.usteringa1.gorithmscanbe1.abe1.edbaseon(henat
24、hetnatica1.fo11nu1.ationgiventothea1.gorithm:graphtheoreticormatrixa1.gebra.Inthischapterwegenera1.1.yusethegraphapproachanddescribetheinputtothec1.usteringa1.gorithmasanadjacencymatrix1.abe1.edwithdistancemeasure.Wcdiscussmanyc1.usteringa1.gorithmsinthefo1.1.owingsections.Thisison1.yarepresentative
25、subsetofthemanya1.gorithmsthathavebeenproposedinthe1.iterature.Bcfbrckkingatthesea1.gorithms,WCfirstexaminepossib1.esimi1.aritymeasuresandexaminetheimpactofout1.iers.5.2Simi1.arityanddistancemeasures!herearemanydesirab1.epropertiesforthec1.usterscreatedbyaso1.utiontoaspecificc1.usteringprob1.em.Them
26、ostimportantoneisthatatup1.ewithinonec1.usterismore1.iketup1.eswithin(hatc1.usterthaniti$simi1.ar(otup1.esoutsideit.Aswithc1.assification,then,wcassumethedefinitionofasimi1.aritymeasure,sim(1.,t1.),definedbetweenanytwotup1.es,ti.t1.GD.Ihisprovidesamorestrictanda1.ternativec1.usteringdefinition,asfou
27、ndinDefinition5.2.Un1.essotherwisestated,weusethefirsjdefinitionratherthanthesecond.Keepinmindthatthesimi1.arityre1.ationshipstatedwithintheseconddefinitionisadesirab1.e,a1.thoughnota1.waysobtainab1.e,property.Adistancemeasure,dis(asopposedtosimi1.arity,isoftenusedinc1.ustering.T1.iec1.usteringprob1
28、emthenhasthedesirab1.epropertythatgivenac1.uster.K1.V.ywK.andtieKi.sim(ti,.tim)dis(tf1.ti).Somec1.usteringa1.gorithms1.ookon1.yatnumericdata,usua1.1.yassumingmetricdatapoints.Metricattributessatisfythetriangu1.arinequa1.ity.Thec1.ustercanthenbedescribedbyusingsevera1.ChUrHCICriS1.iCva1.ues.Givenac1
29、uster.KnofNpints(w1.n,.h,v).wemakethefo1.1.owingdefinitionsZR1.96:Herethecentroidisthe“midd1.eofthec1.uster:itneednotbeanactua1.pointinthec1.uster.Somec1.usteringa1.gorithmsa1.ternative1.yassumethatthec1.usterisrepresentedbyonecentra1.1.y1.ocatedobjectinthec1.usterca1.1.edamedoid.T1.ieradiusisthesq
30、uarerootoftheaveragemeansquareddistancefromanypointinihcc1.ustertothecentroid,andofpointsinthec1.uster.WcusethenotationMntoindicatethemcdoidforCIUSIerKR.Manyc1.usteringa1.gorithmsrequirethatthedistancebetweenc1.usters(ratherthane1.ements)bedetermined.Thisisnotaneasytaskgiventhattherearcmanyinterpret
31、ationsfordistancebetweenc1.usters.Givenc1.ustersK1andK,therearcsevera1.standarda1.ternativestoca1.cu1.atethedistancebeiveenc1.usters.Arepresentative1.istis: Sing1.e1.ink:Sma1.1.estdistancebetweenane1.ementinonec1.usterandane1.ementintheother.Wcthushavedis(K,.J)=min(dis(jj,)RogK,w,anIVwGK1eKi. Comp1.
32、ete1.ink:1.argestdistancebetweenane1.ementinonec1.usterandane1.ementintheother.Wethushavedis(K.K,)=max(dis(ti1.jm)VrrfeKieKjandVrjWeK1tKi. Average:Averagedistancebetweenane1.ementinonec1.usterandane1.ementintheother.Wcthushavedis(Ki,Ki)=mean(dis(f,tfi)VftfeKieK1andVjh,WKjWKi. Centroid:Ifc1.usterhave
33、arepresentativecentroid,thenthecentroiddistanceisdefinedasthedistancebetweenthecentroids.Wcthushavedis(K,K)=dis(C1.,Cf).whereC1isthecentroidforK1andsimi1.ar1.yforC1. Mcdoid:Usinganesofthesetessassumesing1.eattributeva1.ue,andmanyattributesarcinvo1.vedinrea1.-wor1.ddatasets.A1.ternativedetectiontechn
34、iquesmaybebasedondistancemeasures.聚类分析5.1 简介聚类分析与分类数据分组类似。然而,与数据分类不同的是,所分的组预先是不确定的。相反,分组是根据在实际数据中发现的特点通过寻找数据之间的相关性来实现的.这些组被称为聚类“一些作者认为聚类分析作为一种特殊类型的分类。但是,在本文两个不同的观点中我们遵循更传统的看法。提出J许多有关聚类的定义: 类似元素的集合。不同聚类中的元素.是不样的。 在聚类中的点之间的距离比在聚类中的一个点和聚类之外任何一点之间的距离要小。与聚类类似的术语是数据库分割,其中数据库中的元组(记录)被放在起。这样做是为了分割或划分成数据的数据库
35、组件,然后给用户个普遍的看法。这样本文我们就不区分分割和聚类.一个简单聚类分析的例子见例5.这个例子说明r决定如何做聚类并不是容易的。正如图5.1所示,个给定的数据集合可能会聚不同的属性。这里显示了个地域的住宅群一楼的聚类类型是基丁家庭的位置.家庭地理位置相近,彼此都聚集在一起,在第二个聚类,家庭的分类是基T房子的大小分类。聚类已被用于许多应用领域,包括生物学,医学.人类学,市场营销和经济学。聚类分析的应用包括植物和动物分类,疾病分类,图像处理,模式识别,文献检索.最先使用聚类分析的领域是生物分类学.最近的使用包括通过研究Web日志的数据来检测其使用模式。当聚类分析应用到现实世界的数据库,许多
36、有趣的问题将出现: 异常值的处理是困雄.的。这里的元素通常不属于任何个集合。它们可以被看作是那立集合。但是,如果聚类算法试图找到更大的集合,这些异常值将被迫放在某个集合内。此过程可能会导致结合两个现有的聚类来建立出贫乏的聚类,并J1.新建立的聚类本身会出现异常. 数据库的动态数据意味若聚类成田可能会随时间而改变. 解样每个聚类的意义可能是困难的。通过分类,类的标签提前了。然而,聚类可能并非如此。这样,当聚类过程生成了一个聚类集合,每个集合确实切含义可能不非常明显。卜面是其中一个领域专家是需要为每个聚类分配一个标签或解择。 对于聚类问题没有准确的答案。事实上,也可以找到很多答案,该聚类所需确实切
37、数目是不容易确实定。同样,一个领域的专家可.能需要。例如,假设我们有经过实地考察采集的植物数据。分析之前没有任何有关植物分类的知识,如果我们试图将这些数据划分为类似的分组,我们不知道应该建立多少分组。 另个相关的问题是聚类分析应该使用什么样的数据。与分类过程中的学习不I可,分类有一些先验知识,知道每个分类的属性,而在聚类分析中,没有有监督的学习来促进这一过程事实上,聚类分析可以看作无监督学习.这样我们总结一些聚类分析的本特征(相对分类而言): 聚类的(最正询)数目是不知道的 对于某个聚类可能没有任何先验知识 聚类的果是动态的。聚类问题表达的正如定义5.1.所示,这里我们假设创立的聚类的数目为一
38、个输入值k,每个聚类号J1.jk)的实际内容1说明),作为一个功能定义。不失一般性,我们认为,解决问题的结果建立的聚类集合:K=(Jt,kta定义5.1一个数组契合Q=t1.,1.zr“和一个整数k,聚类问题是定义一个缺再力D(1.k,其中分配疗课类K,(1.jk)。聚类号,就是亲合。映射到KmfuJ=Ky,1.fH,and1.,eDt聚类算法的不同类型的分类如图5.2。聚类算法本身就可视为分层或分块的。分层聚类分析可以建立一个嵌套的聚类集合。在层次结构中的每层都有雎独的聚类。在圾低层,每个工程都划分在不同的特殊的集合中。在最顶层,所有的工程属于同一集合,通过分层聚类,需要的聚类数目并没有输入
39、分块聚类分析鸵法只创立一个聚类集合。这些方法通过所需的聚类集合数目促使最终集合的建立。传统的聚类算法往往是针对适合小数据库。然而,现在的聚类算法,从分类数据上来看,是针对动态的大数据库.针对大型数据库的算法可适应内存限制通过数据采样或者是使用该数据库的数据结构,从而可以被压缩或修订,以适应数据库的内存限制。也可能是基于是否产生延接聚类算法。即使我们只考虑全强的聚类,它可以把某个工程放置在多个聚类中。反过来,不重强的聚类可以被看作是外在的或者内在的。外源性技术使用工程标签以协助分类。这些算法是传统的分类监督学习算法,这个算法用到了特殊的输入训练集合。内在的算法没有使用任何先验的类别标卷,仅仅依
40、赖于矩阵中邻近时象之间的距离。我们在本章研究的所有算法都属于内在类。聚类算法的类型基于实现技术使用的根底上可以被进一步分类.分层算法可以归类为凝聚克法或者分裂知法。“凝聚”意味着在一个聚类是通过自下而上的方式产生,而分裂算法那么是以自上而卜的方式工作。虽然分层和分块的算法用凝聚与分裂的标签来描述,但它通常与分层算法联系更紧密。另一种描述标签是指是否对每个元素一处理,一系列(有时称为增量)的起处理,或者是否所有的工程都放在起同步研究0如果一个特定的数组被视为具有在该架构中的所有属性,然后可以用不同聚类算法迸行属性检查.由丁通常用分U分类的技术来完成,有些算法分析屈性值每次只分析一个,Po1.yI
41、he1.iC算法考虑的是每次的所有属性值.最后,聚类算法以算法的数学公式被表示出来:图表或矩阵代数的理论根底。这一章中,我们采用图形方式,并且把聚类算法的输入描述为邻近距阵中距离变化。我们在以卜各节讨论许多聚类和法。这只是已在文献中提出了很多算法中具有代表性的一个。在这些算法找到之前,我们首先研究类似的处理措施,并研究对异常值的影响。5.2 相似性和距离测量一个特殊的聚类问胭的解决方案可以产生很多理想的特性。最求要的是,在某个聚类中的一个数组比聚类外的数组更像聚类中的。至于经过分类,那么,假设我们定义一个近似度小今亡。.定义5.2提供了个更严格的定义和可替代的聚类。除非另有说明,我们使用第个定
42、义而不是第二个。在第二个定义中的表达的相似美系是可以获得的特点,但是并不总能获得.距离量dis(,.,J而不是相似度,往往被用于聚类分析。根据这样聚类问题可以获得K1.VrjvJjroKj和1.QSdiMr这两个集合所表示的特性。一些聚类算法只看数字型数据,通常假定度蚊数据点。度量屈性满足三角不等式。那么聚类集合可以使用多种特征值来描述。给出个聚类集合,N点r1.w2.tmN中的KM,我们提出以下定义ZR1.96I:这里的质心是聚类集合的“中心”,它不一定是一个聚类集合中的实点。一些聚类算法可能假设聚类臾合是由位丁聚类集合中心的中心点代替。半径是从集合中的中心点到聚类集合中的任何点间的距尚的平方根,并且是对聚类集合