




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
FoundationsofMachineLearning
ClusteringBasics(聚类基础)2023/11/4ClusteringLesson8-1ClusteringBasicsDefinitionandMotivation(定义与动机)DataPreprocessingandSimilarityComputationObjectiveofClusteringClusteringEvaluation
2023/11/4ClusteringLesson8-2ClusteringBasicsDefinitionandMotivationFindinggroupsofobjectssuchthattheobjectsinagroupwillbesimilar(orrelated)tooneanotheranddifferentfrom(orunrelatedto)theobjectsinothergroups.2023/11/4ClusteringLesson8-3ClusteringBasicsDefinitionandMotivation
Astand-alonetool:exploredatadistributionApreprocessingstepforotheralgorithmsPatternrecognition,spatialdataanalysis,imageprocessing,marketresearch,WWW,…ClusterdocumentsClusterweblogdatatodiscovergroupsofsimilaraccesspatternsClusteringCo-expressedGenesMarketing:Helpmarketersdiscoverdistinctgroupsintheircustomerbases,andthenusethisknowledgetodeveloptargetedmarketingprogramsClimate:understandingearthclimate,findpatternsofatmosphericandocean
2023/11/4ClusteringLesson8-4ClusteringBasicsDefinitionandMotivationAstand-alonetool:exploredatadistributionApreprocessingstepforotheralgorithmsPatternrecognition,spatialdataanalysis,imageprocessing,marketresearch,WWW,…TwoImportantAspectsPropertiesofinputdataDefinethesimilarityordissimilaritybetweenpointsRequirementofclusteringDefinetheobjectiveandmethodology
2023/11/4ClusteringLesson8-5ClusteringBasicsDefinitionandMotivationDataPreprocessingandSimilarityComputation(数据预处理和相似性计算)
ObjectiveofClusteringClusteringEvaluation
2023/11/4ClusteringLesson8-6DataPreprocessingandSimilarityComputationData:CollectionofdataobjectsandtheirattributesAnattributeisapropertyorcharacteristicofanobjectExamples:eyecolorofaperson,temperature,etc.Attributeisalsoknownasdimension,variable,field,characteristic,orfeatureAcollectionofattributesdescribeanobjectObjectisalsoknownasrecord,point,case,sample,entity,orinstance2023/11/4ClusteringLesson8-7DataPreprocessingandSimilarityComputationDataMatrix(数据矩阵)Representsnobjectswithpvariables
2023/11/4ClusteringLesson8-8DataPreprocessingandSimilarityComputationSimilarityandDissimilaritySimilarityNumericalmeasureofhowaliketwodataobjectsareIshigherwhenobjectsaremorealikeOftenfallsintherange[0,1]DissimilarityNumericalmeasureofhowdifferentaretwodataobjectsLowerwhenobjectsaremorealikeMinimumdissimilarityisoften0Upperlimitvaries2023/11/4ClusteringLesson8-9DataPreprocessingandSimilarityComputationDistanceMatrix(距离矩阵)Representspairwisedistanceinnobjects
Annbynmatrixd(i,j):
distanceordissimilaritybetweenobjectsiandjNonnegativeCloseto0:similar
2023/11/4ClusteringLesson8-10DataPreprocessingandSimilarityComputationDataMatrix->DistanceMatrix2023/11/4ClusteringLesson8-11DataPreprocessingandSimilarityComputationTypesofAttributes(属性的类型)Discrete(离散)HasonlyafiniteorcountablyinfinitesetofvaluesExamples:zipcodes,counts,orthesetofwordsinacollectionofdocumentsNote:binaryattributesareaspecialcaseofdiscreteattributesOrdinal(定序)HasonlyafiniteorcountablyinfinitesetofvaluesOrderofvaluesisimportantExamples:rankings(e.g.,painlevel1-10),grades(A,B,C,D)Continuous(连续)HasrealnumbersasattributevaluesExamples:temperature,height,orweightContinuousattributesaretypicallyrepresentedasfloating-pointvariables2023/11/4ClusteringLesson8-12DataPreprocessingandSimilarityComputationSimilarity/DissimilarityforSimpleAttributes
2023/11/4ClusteringLesson8-13DataPreprocessingandSimilarityComputationSimilarity/DissimilarityforSimpleAttributesMinkowskiDistance—ContinuousAttributeMinkowskidistance:ageneralizationIfq=2,disEuclideandistanceIfq=1,disManhattandistance2023/11/4ClusteringLesson8-14DataPreprocessingandSimilarityComputationSimilarity/DissimilarityforSimpleAttributes
MinkowskiDistance—ContinuousAttributeStandardizationCalculatethemeanabsolutedeviationCalculatethestandardizedmeasurement(z-score)2023/11/4ClusteringLesson8-15DataPreprocessingandSimilarityComputationSimilarity/DissimilarityforSimpleAttributesMinkowskiDistance—ContinuousAttributeStandardizationMahalanobisDistance
Adissimilaritymeasurebetweentwo
randomvectorsxandyofthesame
distributionwiththe
covariancematrix
S.2023/11/4ClusteringLesson8-16DataPreprocessingandSimilarityComputationSimilarity/DissimilarityforSimpleAttributesMinkowskiDistance—ContinuousAttributeStandardizationMahalanobisDistanceCommonPropertiesofaDistanceDistances,suchastheEuclideandistance,havesomewellknownproperties1.d(p,q)>=0forallpandqandd(p,q)=0onlyifp=q.(Positivedefiniteness)2.d(p,q)=d(q,p)forallpandq.(Symmetry)3.d(p,r)<=d(p,q)+d(q,r)forallpointsp,q,andr.(TriangleInequality)2023/11/4ClusteringLesson8-17DataPreprocessingandSimilarityComputationSimilarity/DissimilarityforSimpleAttributesMinkowskiDistance—ContinuousAttributeMahalanobisDistanceSimilarityforBinaryAttributesComputesimilaritiesusingthefollowingquantitiesM01=thenumberofattributeswherepwas0andqwas1M10=thenumberofattributeswherepwas1andqwas0M00=thenumberofattributeswherepwas0andqwas0M11=thenumberofattributeswherepwas1andqwas1SimpleMatchingandJaccardCoefficients2023/11/4ClusteringLesson8-18DataPreprocessingandSimilarityComputationSimilarity/DissimilarityforSimpleAttributesMinkowskiDistance—ContinuousAttributeMahalanobisDistanceSimilarityforBinaryAttributesCommonPropertiesofaSimilaritys(p,q)=1(ormaximumsimilarity)onlyifp=q.s(p,q)=s(q,p)forallpandq.(Symmetry)wheres(p,q)is
thesimilaritybetweenpoints(dataobjects),pandq.2023/11/4ClusteringLesson8-19DataPreprocessingandSimilarityComputationSimilarity/DissimilarityforSimpleAttributesMinkowskiDistance—ContinuousAttributeMahalanobisDistanceSimilarityforBinaryAttributesCommonPropertiesofaSimilarityCharacteristicsoftheInputDataAreImportantSparseness,Attributetype,TypeofData,Dimensionality,NoiseandOutliers,TypeofDistribution=>Conductpreprocessingandselecttheappropriatedissimilarityorsimilaritymeasure=>Determinetheobjectiveofclusteringandchoosetheappropriatemethod2023/11/4ClusteringLesson8-20ClusteringBasicsDefinitionandMotivationDataPreprocessingandSimilarityComputationObjectiveofClustering(聚类目标)ClusteringEvaluation2023/11/4ClusteringLesson8-21ObjectiveofClusteringConsiderationsforClusterAnalysisPartitioningcriteriaSinglelevelvs.hierarchicalpartitioning(often,multi-levelhierarchicalpartitioningisdesirable)SeparationofclustersExclusive(e.g.,onecustomerbelongstoonlyoneregion)vs.overlapping(e.g.,onedocumentmaybelongtomorethanonetopic)HardversusfuzzyInfuzzyclustering,apointbelongstoeveryclusterwithsomeweightbetween0and1Weightsmustsumto1Probabilisticclusteringhassimilarcharacteristics
2023/11/4ClusteringLesson8-22ObjectiveofClusteringConsiderationsforClusterAnalysisRequirementsofClusteringScalabilityAbilitytodealwithdifferenttypesofattributesMinimalrequirementsfordomainknowledgetodetermineinputparametersAbletodealwithnoiseandoutliersDiscoveryofclusterswitharbitraryshapeInsensitivetoorderofinputrecordsHighdimensionalityIncorporationofuser-specifiedconstraintsInterpretabilityandusability
2023/11/4ClusteringLesson8-23ObjectiveofClusteringConsiderationsforClusterAnalysisRequirementsofClusteringNotionofaClustercanbeAmbiguous
2023/11/4ClusteringLesson8-24ObjectiveofClusteringConsiderationsforClusterAnalysisRequirementsofClusteringNotionofaClustercanbeAmbiguousTypesofClustersCenter-based
Aclusterisasetofobjectssuchthatanobjectinaclusteriscloser(moresimilar)tothe“center”ofacluster,thantothecenterofanyotherclusterThecenterofaclusterisoftenacentroid,theaverageofallthepointsinthecluster,oramedoid,themost“representative”pointofacluster2023/11/4ClusteringLesson8-25ObjectiveofClusteringConsiderationsforClusterAnalysisRequirementsofClusteringNotionofaClustercanbeAmbiguousTypesofClustersCenter-based
Density-basedAclusterisadenseregionofpoints,whichisseparatedbylow-densityregions,fromotherregionsofhighdensity.Usedwhentheclustersareirregularorintertwined,andwhennoiseandoutliersarepresent.2023/11/4ClusteringLesson8-26ClusteringBasicsDefinitionandMotivationDataPreprocessingandSimilarityComputationObjectiveofClusteringClusteringEvaluation(聚类评价)2023/11/4ClusteringLesson8-27ClusteringEvaluationClustervalidationQuality:“goodness”ofclustersAssessthequalityandreliabilityofclusteringresultsWhyvalidation?ToavoidfindingclustersformedbychanceTocompareclusteringalgorithmsTochooseclusteringparameterse.g.,thenumberofclusters2023/11/4ClusteringLesson8-28ClusteringEvaluationAspectsofClusterValidation
Comparingtheclusteringresultstogroundtruth(externallyknownresults)–ExternalIndex(外部指标)Evaluatingthequalityofclusterswithoutreferencetoexternalinformation–Useonlythedata–InternalIndex(内部指标)Determiningthereliabilityofclusters–Towhatconfidencelevel,theclustersarenotformedbychance–Statisticalframework2023/11/4ClusteringLesson8-29ClusteringEvaluationComparingtoGroundTruth(与真值比较)NotationN:numberofobjectsinthedatasetP={P1,…,Ps}:thesetof“groundtruth”clustersC={C1,…,Ct}:thesetofclustersreportedbyaclusteringalgorithmThe“incidencematrix”(关联矩阵)NbyN(bothrowsandcolumnscorrespondtoobjects)Pij=1
ifOiandOjbelongtothesame“groundtruth”clusterinP;Pij=0otherwise
Cij=1ifOiandOjbelongtothesameclusterinC;Cij=0otherwise2023/11/4ClusteringLesson8-30ClusteringEvaluationComparingtoGroundTruthNotationThe“incidencematrix”(关联矩阵)RandIndexandJaccardCoefficientApairofdataobject(Oi,Oj)fallsintooneofthefollowingcategoriesSS:Cij=1andPij=1;(agree)DD:Cij=0andPij=0;(agree)SD:Cij=1andPij=0;(disagree)DS:Cij=0andPij=1;(disagree)2023/11/4ClusteringLesson8-31ClusteringEvaluationComparingtoGroundTruthNotationThe“incidencematrix”(关联矩阵)RandIndexandJaccardCoefficientEntropyandPuritythenumberofobjectsinboththek-thclusteroftheclusteringsolutionandj-thclusterofthegroundtruththenumberofobjectsinthek-thclusteroftheclusteringsolutionthenumberofobjectsinthej-thclusterofthegroundtruth2023/11/4ClusteringLesson8-32ClusteringEvaluationComparingtoGroundTruthInternalIndex(内部指标)UseonlythedatatomeasureclusterqualityMeasurethe“cohesion”and“separation”ofclustersCalculatethecorrelationbetweenclusteringresultsanddistancematrix2023/11/4ClusteringLesson8-33ClusteringEvaluationComparingtoGroundTruthInternalIndexCohesionandSeparationCohesionismeasuredbythewithinclustersumofsquaresSeparationismeasuredbythebetweenclustersumofsquares2023/11/4ClusteringLesson8-34ClusteringEvaluationComparingtoGroundTruthInternalIndexCohesionandSeparationCohesionismeasuredbythewithinclustersumofsquaresSeparationismeasuredbythebetweenclustersumofsquaresBSS+WSS=constantWSS(Cohesion)measureiscalledSumofSquaredError(SSE)—acommonlyusedmeasureAlargernumberofclusterstendtoresultinsmallerSSE2023/11/4ClusteringLesson8-35ClusteringEvaluationComparingtoGroundTruthInternalIndexCohesionandSeparationSilhouetteCoefficient(轮廓系数)SilhouetteCoefficientcombinesideasofbothcohesionandseparation.Foranindividualpoint,iCalculatea=averagedistanceofitothepointsinitsclusterCalculateb=min(averagedistanceofitopointsinanothercluster)Thesilhouettecoefficientforapointisthengivenbys=1–a/bifa<b,(s=b/a-1ifa>b,nottheusualcase)Typicallybetween0and1Thecloserto1thebetterCancalculatetheAverageSilhouettewidthforaclusteroraclustering2023/11/4ClusteringLesson8-36ClusteringEvaluationComparingtoGroundTruthInternalIndex(内部指标)CohesionandSeparation
SilhouetteCoefficient(轮廓系数)CorrelationwithDistanceMatrixDistanceMatrixDijisthesimilaritybetweenobjectOiandOjIncidenceMatrixCij=1ifOiandOjbelongtothesamecluster,Cij=0otherwise
ComputethecorrelationbetweenthetwomatricesOnlyn(n-1)/2entriesneedstobecalculatedHighcorrelationindicatesgoodclustering2023/11/4ClusteringLesson8-37ClusteringEvaluationComparingtoGroundTruthInternalIndexCohesionandSeparation
SilhouetteCoefficient(轮廓系数)CorrelationwithDistanceMatrixGivenDistanceMatrixD={d11,d12,…,dnn}andIncidenceMatrixC={c11,c12,…,cnn}.CorrelationrbetweenDandCisgivenby2023/11/4ClusteringLesson8-38ClusteringEvaluationComparingtoGroundTruthInternalIndexCohesionandSeparation
SilhouetteCoefficient(轮廓系数)CorrelationwithDistanceMatrixUsingSimilarityMatrixforClusterValidation
Orderthesimilaritymatrixwithrespecttoclusterlabelsandinspectvisually.2023/11/4ClusteringLesson8-39ClusteringEvaluationComparingtoGroundTruthInternalIndexReliabilityofClustersNeedaframeworktointerpretanymeasure–Forexample,ifourmeasureofevaluationhasthevalue,10,isthatgood,fair,orpoor?StatisticsprovideaframeworkforclustervalidityThemore“atypical”aclusteringresultis,themorelikelyitrepresentsvalidstructureinthedata
2023/11/4ClusteringLesson8-40ClusteringEvaluationComparingtoGroundTruthInternalIndexReliabilityofClustersStatisticalFrameworkforSSEExampleCompareSSEof0.005againstthreeclustersinrandomdataSSEHistogramof500setsofrandomdatapointsofsize100—lowestSSEis0.01732023/11/4ClusteringLesson8-41ClusteringEvaluationComparingtoGroundTruthInternalIndexReliabil
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 流程管理年中工作总结
- 思想政治教育主要实施方法
- 建筑石膏抹灰施工课件
- 2025企业租赁合同范本模板
- 2025企业合同审核与流转管理流程
- 2025年土地租赁合同附加协议
- 2025标准商业租赁合同示范文本
- 2025石油贸易居间合同
- 2025代理合同风险评估与委托协议样本
- 让硬币浮起来课件
- 一人有限公司章程(范本)
- 员工惩罚通知单
- 2022全国高考真题化学汇编:专题 烃 卤代烃
- GB/T 25742.4-2022机器状态监测与诊断数据处理、通信与表示第4部分:表示
- 特殊感染手术的配合与术后处理
- 萧红《呼兰河传》课件
- 脑血管病介入诊疗并发症及其处理课件
- 机动车驾驶人考试场地及其设施设置规范
- 大学生三生教育主题班会
- 2023年宜昌市中医医院医护人员招聘笔试题库及答案解析
- 内部控制建设课件
评论
0/150
提交评论