您好,欢迎访问三七文档
1第8章基于实例的学习InstanceBasedLearning2InstanceBasedLearningk-NearestNeighborLocallyweightedregressionRadialbasisfunctionsCase-basedreasoningLazyandeagerlearning3NearestneighborKeyidea:juststorealltrainingexamplesNearestneighbor:Givenqueryinstancexq,firstlocatenearesttrainingexamplexn,thenestimate)(,iixfx)()(ˆnqxfxf4k-Nearestneighbork-Nearestneighbor:Givenxq,Ifdiscrete-valuedtargetfunction:takevoteamongitsknearestnbrsIfreal-valuedtargetfunction:takemeanoffvaluesofk-nearestnbrskxfxfkiiq1)()(ˆ5WhenToConsiderNearestNeighborInstancesmaptopointsinLessthan20attributesperinstanceLotsoftrainingdatan6Advantages&DisadvantagesAdvantages•Trainingisveryfast•Learncomplextargetfunctions•Don’tloseinformationDisadvantagesSlowatquerytimeEasilyfooledbyirrelevantattributes7VoronoiDiagram8BehaviorintheLimitConsiderp(x)definesprobabilitythatinstancexwillbelabeled1(positive)versus0(negative)NearestneighborAsnumberoftrainingexamples∞approachesGibbsAlgorithmGibbs:withprobabilityp(x)predict1else09BehaviorintheLimitConsiderp(x)definesprobabilitythatinstancexwillbelabeled1(positive)versus0(negative)k-NearestneighborAsnumberoftrainingexamples∞andkgetslarge,approachesBayesoptimalBayesoptimal:ifp(x)0.5thenpredict1,else0NoteGibbshasatmosttwicetheexpectederrorofBayesoptimal10Distance-WeightedkNNNearerneighborsaremoreheavilyweighted.Discrete-valuedReal-valuedwherekiiiVvqxfvwxf1))(,(maxarg)(ˆkiikiiiqwxfwxf11)()(ˆ2),(1iqixxdwItmakessensetousealltrainingexamplesinsteadofjustk.[Shepard,1968]11CurseofDimensionalityImagineinstancesdescribedby20attributesbutonly2arerelevanttotargetfunction.Curseofdimensionality:nearestnbriseasilymisleadwhenhigh-dimensionalXApproach:Stretchsomeaxesbyweight,andthencross-validation[MooreandLee,1944]12LocallyWeightedRegressionNotekNNformslocalapproximationtofforeachquerypointxq.Whynotformanexplicitapproximationforregionsurroundingxq?FitlinearfunctiontoknearestneighborsFitquadratic…Producespiecewiseapproximationtof)(ˆxf13Severalchoicesoferrortominimize•Squarederroroverknearestnbrs•Distance-weightedsquarederroroverallnbrs•…个近邻的kxxqqxfxfxE21))(ˆ)((21)(DxqqxxdKxfxfxE)),(())(ˆ)((21)(22)()()(ˆ110xawxawwxfnn14RadialBasisFunctionNetworksGlobalapproximationtotargetfunctionintermsoflinearcombinationoflocalapproximationsAdiferentkindofneuralnetworkCloselyrelatedtodistance-weightedregressionbut“eager”insteadof“lazy”15RadialBasisFunctionNetworks•whereai(x)aretheattributesdescribinginstancex,and•OnecommonchoiceforKu(d(xu,x))isKu(d(xu,x))=kuuuuxxdKwwxf10)),(()(),(2122xxduue16TrainingRBFNetworks•Q2:HowtotrainweightsassumehereGaussianKu•FirstchoosevarianceandperhapsmeanforeachKu--e.g.useEM•ThenholdKufixedandtrainlinearoutputlayer–efficientmethodstofitlinearfunction个近邻的kxxjqiqxaxfxfxxdKw)())(ˆ)())(,((17Case-BasedReasoning•Canapplyinstance-basedlearningevenwhen.•Case-BasedReasoningisinstance-basedlearningappliedtoinstanceswithsymboliclogicdescriptions.nX18Case-BasedReasoninginCADET•CADET:75storedexamplesofmechanicaldevices•eachtrainingexample:qualitativefunction(定性的功能),mechanicalstructure•newquerydesiredfunction•targetvalue:mechanicalstructureforthisfunction•Distancemetric:matchqualitativefunctiondescriptions192021LazyandEagerLearningLazy:waitforquerybeforegeneralizing•k-NearestNeighbor,LocallyWeightedRegression,Casebasedreasoning•Eager:generalizebeforeseeingquery•Radialbasisfunctionnetworks,ID3,Backpropagation,NaiveBayes22Doesitmatter?•Eagerlearnermustcreateglobalapproximation•Lazylearnercancreatemanylocalapproximations•iftheyusesameH,lazycanrepresentmorecomplexfns(e.g.considerH=linearfunctions)
本文标题:基于实例的学习
链接地址:https://www.777doc.com/doc-2574711 .html