k-means clustering - example - usc upstate facultyk-均值聚类样本学院usc北部

k-means clustering - example - usc upstate facultyk-均值聚类样本学院usc北部

ID:10655551

大小:285.50 KB

页数:8页

时间:2018-07-07

k-means clustering - example - usc upstate facultyk-均值聚类样本学院usc北部_第1页
k-means clustering - example - usc upstate facultyk-均值聚类样本学院usc北部_第2页
k-means clustering - example - usc upstate facultyk-均值聚类样本学院usc北部_第3页
k-means clustering - example - usc upstate facultyk-均值聚类样本学院usc北部_第4页
k-means clustering - example - usc upstate facultyk-均值聚类样本学院usc北部_第5页
资源描述:

《k-means clustering - example - usc upstate facultyk-均值聚类样本学院usc北部》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、K-MeansClusteringExampleK-MeansClustering–ExampleWerecallfromthepreviouslecture,thatclusteringallowsforunsupervisedlearning.Thatis,themachine/softwarewilllearnonitsown,usingthedata(learningset),andwillclassifytheobjectsintoaparticularclass–forexample,ifourclass(decision)attributeistumorTyp

2、eanditsvaluesare:malignant,benign,etc.-thesewillbetheclasses.Theywillberepresentedbycluster1,cluster2,etc.However,theclassinformationisneverprovidedtothealgorithm.Theclassinformationcanbeusedlateron,toevaluatehowaccuratelythealgorithmclassifiedtheobjects.CurvatureTextureBloodConsumpTumorTy

3、pex10.81.2ABenignx20.751.4BBenignx30.230.4DMalignantx4..0.230.5DMalignantCurvatureTextureBloodConsumpTumorTypex10.81.2ABenignx20.751.4BBenignx30.230.4DMalignantx4..0.230.5DMalignant(learningset)CurvatureTextureBloodConsump0.80.231.20.4ABD.x1Thewaywedothat,isbyplottingtheobjectsfromthedatab

4、aseintospace.Eachattributeisonedimension:CurvatureTextureBloodConsump0.80.231.20.4ABD.......Cluster1benignCluster2malignant.Afteralltheobjectsareplotted,wewillcalculatethedistancebetweenthem,andtheonesthatareclosetoeachother–wewillgroupthemtogether,i.e.placetheminthesamecluster.8K-MeansClu

5、steringExampleWiththeK-Meansalgorithm,werecallitworksasfollows:8K-MeansClusteringExampleExampleProblem:Clusterthefollowingeightpoints(with(x,y)representinglocations)intothreeclustersA1(2,10)A2(2,5)A3(8,4)A4(5,8)A5(7,5)A6(6,4)A7(1,2)A8(4,9).Initialclustercentersare:A1(2,10),A4(5,8)andA7(1,2

6、).Thedistancefunctionbetweentwopointsa=(x1,y1)andb=(x2,y2)isdefinedas:ρ(a,b)=

7、x2–x1

8、+

9、y2–y1

10、.Usek-meansalgorithmtofindthethreeclustercentersaftertheseconditeration.Solution:Iteration1(2,10)(5,8)(1,2)PointDistMean1DistMean2DistMean3ClusterA1(2,10)A2(2,5)A3(8,4)A4(5,8)A5(7,5)A6(6,4)A7(1,2)A8

11、(4,9)Firstwelistallpointsinthefirstcolumnofthetableabove.Theinitialclustercenters–means,are(2,10),(5,8)and(1,2)-chosenrandomly.Next,wewillcalculatethedistancefromthefirstpoint(2,10)toeachofthethreemeans,byusingthedistancefunction:pointmean1x1,y1x2,y2(2,10)(2,1

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。