版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1 1 3IntroductiontoMatlab3IntroductiontoMatlabWhatisaMatlabToolboxesarespecializedcollectionsofMatlabWhydoweneedthe4WhattypeoftoolboxesdoesMatlab4WhattypeoftoolboxesdoesMatlab??ParallelComputing數(shù)學、統(tǒng)計與優(yōu)SymbolicMathPartialDifferentialEquationStatisticsandMachineLearningCurveFittingOptimizationNeuralNetworkModel-BasedCalibrationControlSystemToolboxFuzzyLogicToolboxRobustControlModelPredictiveControlToolboxAerospaceToolboxRoboticsSystem???????5WhattypeoftoolboxesdoesMatlab5WhattypeoftoolboxesdoesMatlab信號處無線DSPSystemToolboxAudioSystemToolboxWaveletToolboxRFToolboxLTESystemToolboxWLANSystem??????????圖像處理與計算機視ImageProcessingToolboxVisionHDLToolboxMappingToolbox?????測試&DataAcquisitionToolboxImageAcquisitionToolboxOPCToolboxVehicleNetwork?????6Whattypeoftoolboxesdoes6WhattypeoftoolboxesdoesMatlab計算FinancialDatafeedToolboxDatabaseToolboxSpreadsheetLink(forMicrosoftExcel)FinancialInstrumentsToolbox???????計算生Bioinformatics代碼MATLABHDLVisionHDLHDLFilterDesignHDLFixed-Point7Whattypeoftoolboxes7WhattypeoftoolboxesdoesMatlabMATLABMATLABCompilerSpreadsheetLink(forMicrosoftMATLABProductionDatabaseMATLABReportFromDeepLearning8WherecanI8WherecanIfindinformationregarding9ClusteringusingtheStatistics9ClusteringusingtheStatisticsandMachineLearningToolboxTheMatlabStatisticsandMachineLearningToolboxhasmanyStatisticsandDataimportandexport,descriptivestatistics,visualizationProbabilityDistributionsDatafrequencymodels,randomsamplegeneration,parameterestimationHypothesisTestst-test,F-test,chi-squaregoodness-of-fittest,andClusterUnsupervisedlearningtechniquestofindnaturalgroupingsandpatternsinAnalysisofvarianceandcovariance,multivariateANOVA,repeatedmeasuresANOVALinear,generalizedlinear,nonlinear,andnonparametrictechniquesforsupervisedSupervisedlearningalgorithmsforbinaryandmulticlassproblemsDimensionalityReductionPCA,factoranalysis,nonnegativematrixfactorization,sequentialfeatureselection,andmoreIndustrialStatisticsDesignofexperiments(DOE);survivalandreliabilityanalysis;statisticalprocesscontrolSpeedUpStatisticalComputationsParallelordistributedcomputationofstatistical????????????????????WhatisAWhatisAwaytoform'naturalgroupings'inyourItisaformofunsupervisedlearning–yougenerallydoNOThaveexamplesdemonstratinghowthedatashouldbegroupedWhydoweneedMarketsegmentation:Assistmarketerstoidentifydistinctsub-groupsofcustomersinorderWhydoweneedMarketsegmentation:Assistmarketerstoidentifydistinctsub-groupsofcustomersinordertodeveloptargetedmarketingprogramsGuiltbyassoito”:IdentifyinggroupsofgenesthatbehavesimilarlyunderasetofdifferentexperimentalClusterClusterClusterClustering Clustering K-means K-means K-meansThek-meansalgorithmK-meansThek-meansalgorithmpartitionsthedataintokexclusiveFeatureFeatureK-meansThek-meansalgorithmpartitionsK-meansThek-meansalgorithmpartitionsthedataintokexclusiveK=FeatureFeatureK-meansThek-meansalgorithmpartitionsK-meansThek-meansalgorithmpartitionsthedataintokmutuallyexclusiveK=FeatureFeatureHowdoesitK-meansFormalminimizetotalintra-clusterKd(xjK-meansFormalminimizetotalintra-clusterKd(xj,iSiistheithcluster(i=1,2,...,i1xjμiistheithcentroidofallthepointsinclusterdisadistanceOptimalSuboptimalK-meansIfweknewK-meansIfweknewtheclusterassignmentofeachwecouldeasilycomputethecentroidsIfweknewthecentroidpositionswecouldassigneachpointtoaButwedon’tknowneitherofK-meansAlgorithmChooseK-meansAlgorithmChoosethenumberofclusters,RandomlychooseinitialpositionsofKAssigneachofthepointstothe“nat(dependsondistanceK=K-meansAlgorithmK-meansAlgorithmChoosethenumberofclusters-RandomlychooseinitialpositionsofKAssigneachofthepointstothe“astn”(dependsondistanceK=K-meansAlgorithmChooseK-meansAlgorithmChoosethenumberofclusters-RandomlychooseinitialpositionsofKAssigneachofthepointstothe“artend”ondistancemeasure)CalculatetheintraclusterRe-computecentroidIfsolutionconverges→K=K-meansAlgorithmChooseK-meansAlgorithmChoosethenumberofclusters-RandomlychooseinitialpositionsofKAssigneachofthepointstothe“restetrod”ondistancemeasure)CalculatetheintraclusterRe-computecentroidIfsolutionconverges→K=K-meansAlgorithmChoosethenumberK-meansAlgorithmChoosethenumberofclusters-RandomlychooseinitialpositionsofKcentroidsAssigneachofthepointstothe“restetrod”ondistancemeasure)CalculatetheintraclusterRe-computecentroidpositionsIfsolutionconverges→Stop!K=??????K-meansAlgorithmChooseK-meansAlgorithmChoosethenumberofclusters-RandomlychooseinitialpositionsofKAssigneachofthepointstothe“restetrod”ondistancemeasure)CalculatetheintraclusterRe-computecentroidIfsolutionconverges→K=K-meansAlgorithmChooseK-meansAlgorithmChoosethenumberofclusters-RandomlychooseinitialpositionsofKAssigneachofthepointstothe“artend”ondistancemeasure)CalculatetheintraclusterRe-computecentroidIfsolution(theintraclustervarianceddnchange)→K=K-means:otherthingsweneedtoHowshouldK-means:otherthingsweneedtoHowshouldwechooseWhattypeofdistancemeasurescanweuse,andhowtochoosebetweenthem?((x2–x1)2+–y1)2)Sumofabsolute|x2–x1|+|y2–1–tAndK-means:otherthingsweneedK-means:otherthingsweneedtoDoesthealgorithmconvergencetoanoptimalCanyouthinkofstrategiesforsolvingBeforewelearnhowtoBeforewelearnhowtodoK-meansinMatlablet’slookatsomerealdata…Inthe1920's,botanistscollectedmeasurementsonsepalsepalpetalpetalof150iris,50fromeachofthreespecies(setosa,versicolor,ThemeasurementsbecameknownasFisher'sirisFisher’sIrisload4Fisher’sIrisload4SampleSampleSampleSample>>1>>'versicolor''virginica','virginica','setosa','setosa','setosa','setosa',FeatureFeatureFeatureFeatureExploringcorrelationsintheExploringcorrelationsintheFisher’sIrisparam_names={'sepallength','sepalwidth','petallength','petaltext([.05.30.55.80],[-0.1,-0.1,-0.1,-0.1],param_names,text([-0.12,-0.12,-0.12,-0.12],[0.800.550.300.05],'FontSize',12,ThepetallengthandwidtharehighlyVisualizingFisher’sIris%76543218276545SepalSepalVisualizingFisher’sIris%76543218276545SepalSepalPetal4K-meansusingDoingK-meansinMatlabis=K-meansusingDoingK-meansinMatlabis=BydefaultkmeansusessquaredEuclidiandistanceTheKTheclusterbelongstoK-meansusingDisplayingthealgorithm=K-meansusingDisplayingthealgorithm=210sumof123441112=K-meansusingClusteringptsymbK-meansusingClusteringptsymb=%Plotclusterpointsfori=1:2clust=(cidx2==i);holdNoticethatclusteringisdonebutvisualization%Plotclustercentroidholdxlabel('SepalLength');ylabel('SepalWidth');zlabel('Petalgridtitle('IrisdataclusteredwithK-meanswhereK=K-meansusingClusteringCluster765Cluster43218276544SepalSepalPetal K-meansusingClusteringCluster765Cluster43218276544SepalSepalPetal K-meansusingClustering765becausetheupperclusterisspreadout,thesethreepointsareclosertothecentroidofthelowerclusteruppercluster43218276544SepalSepalPetal K-meansusingClustering765becausetheupperclusterisspreadout,thesethreepointsareclosertothecentroidofthelowerclusteruppercluster43218276544SepalSepalPetal K-meansusingIncreasingthenumberofK-meansusingIncreasingthenumberof=11112430sumdistances=123455K-meansusingClusteringK-meansusingClusteringfori=clust=(cidx3==i);holdonholdxlabel('SepalLength');ylabel('SepalWidth');zlabel('PetalgridK-meansusingK-meansusingK-meansusingAvoidinglocalminimausingareplicates=4K-meansusingAvoidinglocalminimausingareplicates=458=====K-meansusing76543218276544SepalSepalPetal K-meansusing76543218276544SepalSepalPetal K-meansusing=7Wecanusethecosfunctionasadistancemeasurebetween6543218276544SepalSepalPetal K-meansusing=7Wecanusethecosfunctionasadistancemeasurebetween6543218276544SepalSepalPetal K-meansusingWhichdistancemeasureisK-meansusingWhichdistancemeasureismoreeWeknowthelabelofeachsample.Wecancompareclustersdiscoveredbykmeanstotheactualflowertypes.Note:usuallyinunsupervisedlearningwedoNOTknowthelabelsoftheK-meansusing%TestingtheclusteringaccuracyK-meansusing%Testingtheclusteringaccuracyfori=clust=find(cidx_cos==i);holdonxlabel('Sepalylabel('SepalWidth');gridonmiss=find(cidx_cos===holdK-meansusingCosinebaseddistance:576543218276544SepalPetal K-meansusingCosinebaseddistance:576543218276544SepalPetal K-meansusingEuclideanbaseddistance:1476543218276544SepalSepalPetal K-meansusingEuclideanbaseddistance:1476543218276544SepalSepalPetal HowtochooseWeneedaquantitativemethodtoHowtochooseWeneedaquantitativemethodtoassessthequalityofaThesilhouettevalueofapointisameasureofhowsimilarapointispointsinitsownclustercomparedtopointsinother-Formaldefinition:s(i)max(a(i),istheaveragedistanceofthepointitotheotherpointsinitsownclusterd(i,C)istheaveragedistanceofthepointitotheotherpointsintheclusteristheminimald(i,C)overallclustersotherthanHowtochooseSilhouettevaluesrangesfromHowtochooseSilhouettevaluesrangesfrom-1to→~=objectiswell→~objectisontheborderbetween2→~=-ObjectisclassifiedThesilhouettecoefficientistheaveragesilhouettevalueoverItisaquantitativemeasurethatcanassessthequalityofHowtochooseToHowtochooseTodemonstratetheutilityofthesilhouettecoefficientwecantestitonsyntheticdataforwhichweknowthenumberofx1=randn(1,100);y1=randn(1,scatter(x1,y1,25,[100],holdx2=randn(1,100)+3;y2=randn(1,scatter(x2,y2,25,[010],+x3=randn(1,100)+8;y3=randn(1,100);scatter(x3,y3,25,[001],'filled');holdHowtochooseTodemonstratetheutilityofthesilhouettecoefficientwecantestitonsyntheticdataforwhichweknowthenumberofWeknowthatKis65432100HowtochooseTodemonstratetheutilityofthesilhouettecoefficientwecantestitonsyntheticdataforwhichweknowthenumberofWeknowthatKis654321002468HowtochooseWerunthek-meansalgorithmfordifferentx=[x1,x2,y=[y1,data=[x',K====K=K=6665554443332221110000505 05HowtochooseWerunthek-meansalgorithmfordifferentx=[x1,x2,y=[y1,data=[x',K====K=K=6665554443332221110000505 05Howtochoose>>[silh2,h]=>>1arepoorly201Howtochoose>>[silh2,h]=>>1arepoorly201Howtochoose>>[silh3,h]>>12301SilhouetteHowtochoose>>[silh3,h]>>12301SilhouetteHowtochoose>>[silh4,h]>>12340SilhouetteHowtochoose>>[silh4,h]>>12340Silhouette1HowtochooseOptimalSilhouettevalueisachievedwhenK=32345K6HowtochooseOptimalSilhouettevalueisachievedwhenK=32345K678MeansilhouetteK-means investigateK-means investigategroupinginyourdata,simultaneouslyoveravarietyofscalesAlgorithm1)DeterminethedistancebetweenAlgorithm1)DeterminethedistancebetweeneachpairofdifferentTypesofdistances(Euclidean,correlation,1234512345Algorithm1)DeterminethedistancebetweeneachpairAlgorithm1)Determinethedistancebetweeneachpairof2)IterativelygrouppointsintoabinaryhierarchicaltreeConnecttheclosestpairofpointsandre-computedistance9876Thedistanceatwhichthepairofpointswere34521Algorithm1)DeterminethedistancebetweeneachpairofAlgorithm1)Determinethedistancebetweeneachpairof2)Iterativelygrouppointsintoabinaryhierarchicaltree3)Cutthehierarchicaltreeinto34521Hierarchicalclustering,otherthingsweHierarchicalclustering,otherthingswetoTypesofSinglelinkageiorDistancebetweengroupsisdefinedasthebetweentheclosestpairofpointsfromeachHierarchicalclustering,otherthingsweHierarchicalclustering,otherthingswetoTypesofCompletelinkageibDistancebetweengroupsisdefinedasthedistancebetweenthemostdistantpairofpointsfromtwoHierarchicalclustering,otherHierarchicalclustering,otherthingsweneedtoconsiderTypesofAveragelinkageclustering:Thedistancebetweentwoclustersisdefinedastheaverageofdistancesbetweenallpairsofpoints(ofoppositeHierarchicalclustering,otherthingswetoHierarchicalclustering,otherthingswetoWheretocuttheCuttingatanarbitraryHierarchicalclustering,otherthingsweneedtoconsiderWheretocuttheHierarchicalclustering,otherthingsweneedtoconsiderWheretocutthe??CuttingatanarbitraryCuttingatinconsistencyComparetheheightofeachlinkinthetreewiththeheightsoflinksbelowit:IfapproximatelyequalThislinkexhibitsahighlevelofconsistency.Therearenodistinctdivisionsbetweentheobjectsjoinedatthislevelofthehierarchy.?IfheightsdifferThislinkissaidtobeinconsistentinrespecttothelinksbelowit.Thisindicatestheborderofanaturaldivisioninadataset.Forformaldefinitionsseetoolbox??HierarchicalclusteringusingLoadtheIris>>HierarchicalclusteringusingLoadtheIris>>load1)Computethedistancesbetweeneach>>euc
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 體育場館注漿施工合同
- 體育館場地平整施工合同范本
- 電力工程合同管理安全管理辦法
- 燈具承包安裝合同范例
- 楓竹苑地產商合同三篇
- 鐵路橋梁工程承攬合同三篇
- 西安公交公司勞動合同(2篇)
- 退休人員返聘合同的性質
- 土建工程包工包料合同應注意的法律風險
- 集體土地賣給個人合同
- 譯林三起小學英語六年級上冊期末復習補全對話短文專題練習一附答案解析
- 泵站工程設計(共138張課件)
- 2024秋期河南開放大學本科《法律社會學》一平臺無紙化考試(作業(yè)練習1至3+我要考試)試題及答案
- 中醫(yī)基礎理論-精氣學說
- 信息素養(yǎng):效率提升與終身學習的新引擎學習通超星期末考試答案章節(jié)答案2024年
- 如何養(yǎng)成良好的財務習慣計劃
- 063.老年婦科患者圍手術期管理中國專家共識(2024年版)
- 骨科護理年會心得
- 小數(shù)加法和減法(教學設計)-2024-2025學年五年級上冊數(shù)學蘇教版
- 臨沂市蘭山區(qū)財金投資集團有限公司招聘筆試題庫2024
- 新課標小學數(shù)學十大核心素養(yǎng)
評論
0/150
提交評論