




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
FoundationsofMachineLearning
EnsembleLearning(集成學(xué)習(xí))Top10algorithmsindataminingC4.5K-MeansSVMAprioriEM(MaximumLikelihood)PageRankAdaBoostKNNNa?veBayesCARTEnsembleLearningIntroductionCommonlyusedensemblelearningalgorithmsBaggingRandomforestBoostingsklearn.ensemble:EnsembleMethods2023/11/4EnsembleLearningLesson7-3IntroductionSomeonewantstoinvestinacompanyXYZ.Heisnotsureaboutitsperformancethough.So,helooksfor
adviceonwhetherthestockpricewillincreasemorethan6%perannumornot?Hedecidestoapproachvarious
expertshavingdiversedomainexperience:
EmployeeofCompanyXYZ:
right70%times.FinancialAdvisorofCompanyXYZ:
right75%times.StockMarketTrader:
right70%times.Employeeofacompetitor:
right60%times.MarketResearchteaminsamesegment:
right75%times.SocialMediaExpert:
right65%times.2023/11/4EnsembleLearningLesson7-4IntroductionSomeonewantstoinvestinacompanyXYZ.Heisnotsureaboutitsperformancethough.So,helooksfor
adviceonwhetherthestockpricewillincreasemorethan6%perannumornot?Hedecidestoapproachvarious
expertshavingdiversedomainexperience:
Inascenariowhenallthe6experts/teamsverifythat
it’sagooddecision(assumingallthepredictionsareindependentofeachother),wewillgetacombinedaccuracyrateof:1-30%*25%*30%*40%*25%*35%=99.92125%2023/11/4EnsembleLearningLesson7-5DefinitionEnsemblelearningisamachinelearningparadigmwheremultiplelearnersaretrainedtosolvethesameproblem.Also,calledmulti-classifiersystem(多分類器系統(tǒng)),orcommittee-basedlearning(基于委員會的學(xué)習(xí)).Incontrasttoordinarymachinelearningapproacheswhichtrytolearnonehypothesisfromtrainingdata,ensemblemethodstrytoconstructasetofhypothesisandcombinethemtouse2023/11/4EnsembleLearningLesson7-6Definition2023/11/4EnsembleLearningLesson7-7DefinitionIndividuallearners(個體學(xué)習(xí)器)areanumberoflearnersusedinanensembleBaselearners(基學(xué)習(xí)器)theindividuallearnersthatareusuallygeneratedfromtrainingdatabyasinglebaselearningalgorithmtoproduceahomogeneousensemble.Componentlearners(組件學(xué)習(xí)器)theindividuallearnersthatareusuallygeneratedfromtrainingdatabymultiplelearningalgorithmtoproduceaheterogeneousensemble.2023/11/4EnsembleLearningLesson7-8DefinitionWeaklearnersOnlyslightlybetterthanrandomguessErrorRate:
<50%MosttheoreticalanalysesworkweaklearnersStronglearnersRendersclassificationofarbitraryaccuracyErrorRate:
isarbitrarilysmallEnsemblelearningisappealingbecausethatisabletoboostweaklearnerstostronglearnersBycombiningdiverseofweaklearners2023/11/4EnsembleLearningLesson7-9DefinitionEnsemblelearningisappealingbecausethatisabletoboostweaklearnerstostronglearnersBycombiningdiverseofweaklearners2023/11/4EnsembleLearningLesson7-10Ensemblelearningisprimarilyusedtoimprovethe(classification,prediction,functionapproximation,etc.)performanceofamodel,orreducethelikelihoodofanunfortunateselectionofapoorone.Otherapplicationsofensemblelearningincludeassigningaconfidencetothedecisionmadebythemodel,selectingoptimal(ornearoptimal)features,datafusion,incrementallearning,nonstationarylearninganderror-correcting.2023/11/4EnsembleLearningLesson7-11ScenariosforusingensemblelearningModelSelection--Whatisthemostappropriateclassifierforagivenclassificationproblem?whattypeofclassifiershouldbechosenamongmanycompetingmodels,suchas
multilayerperceptron
(MLP),
supportvectormachines
(SVM),
decisiontrees,
naiveBayesclassifier,etc;givenaparticularclassification
algorithm,whichrealizationofthisalgorithmshouldbechosen-forexample,differentinitializationsofMLPscangiverisetodifferentdecisionboundaries,evenifallotherparametersarekeptconstant.
2023/11/4EnsembleLearningLesson7-12ScenariosforusingensemblelearningToomuchortoolittledataWhentheamountoftrainingdataistoolargetomakeasingleclassifiertrainingdifficult,thedatacanbestrategicallypartitionedintosmallersubsets.Eachpartitioncanthenbeusedtotrainaseparateclassifierwhichcanthenbecombinedusinganappropriatecombinationrule.Whenthereistoolittledata,thenbootstrapping
canbeusedtotraindifferentclassifiersusingdifferentbootstrapsamples
ofthedata,whereeachbootstrapsampleisarandomsampleofthedatadrawnwithreplacementandtreatedasifitwasindependentlydrawnfromtheunderlyingdistribution.2023/11/4EnsembleLearningLesson7-13ScenariosforusingensemblelearningDivideandConquerCertainproblemsarejusttoodifficultforagivenclassifiertosolve.2023/11/4EnsembleLearningLesson7-14ScenariosforusingensemblelearningDataFusionInmanyapplicationsthatcallforautomateddecisionmaking,itisnotunusualtoreceivedataobtainedfromdifferentsourcesthatmayprovidecomplementaryinformation.Asuitablecombinationofsuchinformationisknownas
dataorinformationfusion,
andcanleadtoimprovedaccuracyoftheclassificationdecisioncomparedtoadecisionbasedonanyoftheindividualdatasourcesalone.Theseheterogeneousfeaturescannotbeusedalltogethertotrainasingleclassifier(andeveniftheycould-byconvertingallfeaturesintoavectorofscalarvalues-suchatrainingisunlikelytobesuccessful).Insuchcases,anensembleofclassifierscanbeused,whereaseparateclassifieristrainedoneachofthefeaturesetsindependently.Thedecisionsmadebyeachclassifiercanthenbecombinedbyanyofthecombinationrulesdescribedbelow.2023/11/4EnsembleLearningLesson7-15ScenariosforusingensemblelearningConfidenceEstimationTheverystructureofanensemblebasedsystemnaturallyallowsassigningaconfidencetothedecisionmadebysuchasystem.Ifavastmajorityoftheclassifiersagreewiththeirdecisions,suchanoutcomecanbeinterpretedastheensemblehavinghighconfidenceinitsdecision.If,however,halftheclassifiersmakeonedecisionandtheotherhalfmakeadifferentdecision,thiscanbeinterpretedastheensemblehavinglowconfidenceinitsdecision.2023/11/4EnsembleLearningLesson7-16WhyensemblessuperiortosinglesSuppose,theerrorofbaselearnersAnensemblewithvotingcanbepresentedasTheerroroftheensembleis2023/11/4EnsembleLearningLesson7-17MethodsforconstructingensemblesSubsamplingthetrainingexamplesMultiplehypothesesaregeneratedbytrainingindividualclassifiersondifferentdatasetsobtainedbyresamplingacommontrainingset.ManipulatingtheinputfeatureMultiplehypothesesaregeneratedbytrainingindividualclassifiersondifferentrepresentations,ordifferentsubsetsofacommonfeaturevectorManipulatingtheoutputtargetsTheoutputtargetsforCclassesareencodedwithanL-bitcodeword,andanindividualclassifierisbuilttopredicteachoneofthebitsinthecodewordModifyingthelearningparametersoftheclassifierAnumberofclassifiersarebuiltwithdifferentlearningalgorithms,suchasnumberofneighborsinaKNNrule,initialweightsinanMPL.2023/11/4EnsembleLearningLesson7-18EnsemblecombinationrulesAlgebraiccombiners(代數(shù)結(jié)合)Algebraiccombinersare
non-trainablecombiners,wherecontinuousvaluedoutputsofclassifiersarecombinedthroughanalgebraicexpression.2023/11/4EnsembleLearningLesson7-19EnsemblecombinationrulesAlgebraiccombinersVotingbasedmethodsVotingbasedmethodsoperateonlabelsonlyMajority(plurality)votingWeightedmajorityvoting2023/11/4EnsembleLearningLesson7-20EnsemblecombinationrulesAlgebraiccombinersVotingbasedmethodsOthercombinationrules
Bordacount
behaviorknowledgespace
(Huang1993)"decisiontemplates"(Kuncheva2001)
Dempster-Schaferrule
(Kittler1998).Foradetailedoverviewoftheseandothercombinationrules,see(L.I.Kuncheva,CombiningPatternClassifiers,MethodsandAlgorithms.NewYork,NY:WileyInterscience,2005.).2023/11/4EnsembleLearningLesson7-21EnsembleLearningIntroductionCommonlyusedensemblelearningalgorithmsBaggingRandomforestBoostingsklearn.ensemble:EnsembleMethods2023/11/4EnsembleLearningLesson7-22CommonlyusedensemblelearningalgorithmsBagging(
bootstrap(自展法)aggregating)isoneoftheearliest,mostintuitiveandperhapsthesimplestensemblebasedalgorithmsBaggingcreatesanensemblebytrainingindividualclassifiersonbootstrapsamplesofthetrainset.Buildaclassifieroneachbootstrapsample2023/11/4EnsembleLearningLesson7-232023/11/4EnsembleLearningLesson7-242023/11/4EnsembleLearningLesson7-25H1H2H3H4SamplingN’exampleswithreplacementSet1Set2Set3Set4(usuallyN=N’)Ntrainingexamples2023/11/4EnsembleLearningLesson7-26y1H1H2H3H4y2y3y4Average/votingTestingdataxThisapproachwouldbehelpfulwhenyourmodeliscomplex,easytooverfit.e.g.decisiontreeTheperturbationinthetrainingsetduetothebootstrapresamplingcausesdifferenthypothesestobebuilt,particularlyiftheclassifierisunstableAclassifierissaidtobeunstableifasmallchangeinthetrainingdata(e.g.orderofpresentationofexample)canbeleadtoaradicallydifferenthypothesis.E.g.decisiontrees,neuralnetwork,logisticsregressionBaggingreducesvarianceIfasingleclassifierisunstable,thatis,ithashighvariance2023/11/4EnsembleLearningLesson7-27BaggingreducesvarianceIfasingleclassifierisunstable,thatis,ithashighvarianceBaggingworkswellforunstablelearningalgorithms.Baggingcanslightlydegradetheperformanceofstablelearningalgorithms.Baggingalmostalwayshelpswithregression,butevenwithunstablelearners,itcanhurtinclassification.2023/11/4EnsembleLearningLesson7-28RandomforestRandomForestsareanimprovement
overbaggeddecisiontrees.AproblemwithdecisiontreeslikeCARTisthattheyaregreedy.Theychoosewhichvariabletosplitonusingagreedyalgorithmthatminimizeserror.Assuch,evenwithBagging,thedecisiontreescanhavealotofstructuralsimilaritiesandinturnhavehighcorrelationintheirpredictions.Combiningpredictionsfrommultiplemodelsinensemblesworksbetterifthepredictionsfromthesub-modelsareuncorrelatedoratbestweaklycorrelated.2023/11/4EnsembleLearningLesson7-29RandomforestRandomForestsareanimprovement
overbaggeddecisiontrees.Randomforestchangesthealgorithmforthewaythatthesub-treesarelearnedsothattheresultingpredictionsfromallofthesubtreeshavelesscorrelation.Therandomforestalgorithmchangesthisproceduresothatthelearningalgorithmislimitedtoarandomsampleoffeaturesofwhichtosearch.2023/11/4EnsembleLearningLesson7-30RandomforestRandomForestsareanimprovement
overbaggeddecisiontrees.Motivation:reduceerrorcorrelationbetweenclassifiersMainidea:buildalargernumberofun-pruneddecisiontreesKey:usingarandomselectionoffeaturestosplitonateachnode(使用隨機(jī)選擇的特征子集來選擇最佳分割特征)2023/11/4EnsembleLearningLesson7-31RandomforestHowRandomforestworksEachtreeisgrownonabootstrapsampleofthetrainingsetofNexamples.AnumbermisspecifiedmuchsmallerthanthetotalnumberofvariablesM(e.g.m=sqrt(M)).Ateachnode,mvariablesareselectedatrandomoutoftheM.Thesplitusedisthebestsplitonthesemvariables.Finalclassificationisdonebymajorityvoteacrosstrees.2023/11/4EnsembleLearningLesson7-32gcForestDeepForest:TowardsAnAlternativetoDeepNeuralNetworksgcForest采用了cascade的結(jié)構(gòu),每層接受特征信息,經(jīng)過處理后傳給下一層。每一層都是一個決策樹深林的總體,也就是由多個隨機(jī)深林組成。隨機(jī)深林的類型越多越好。論文中給定的有兩種類型的隨機(jī)深林,藍(lán)色表示randomforests,黑色表示complete-randomtreeforests。2023/11/4EnsembleLearningLesson7-33gcForestDeepForest:TowardsAnAlternativetoDeepNeuralNetworksIncontrasttodeepneuralnetworkswhichrequiregreateffortinhyper-parametertuning,gcForestismucheasiertotrain;evenwhenitisappliedtodifferentdataacrossdifferentdomainsinourexperiments,excellentperformancecanbeachievedbyalmostsamesettingsofhyper-parameters.ThetrainingprocessofgcForestisefficient,anduserscancontroltrainingcostaccordingtocomputationalresourceavailable.TheefficiencymaybefurtherenhancedbecausegcForestisnaturallyapttoparallelimplementation.Furthermore,incontrasttodeepneuralnetworkswhichrequirelargescaletrainingdata,gcForestcanworkwellevenwhenthereareonlysmall-scaletrainingdata.。2023/11/4EnsembleLearningLesson7-34PerformanceofgcForestImageCategorizationFaceRecognitionMusicClassificationHandMovementRecognition…2023/11/4EnsembleLearningLesson7-35gcForest
Officialimplementationforthepaper'Deepforest:Towardsanalternativetodeepneuralnetworks'Pythonimplementationofdeepforestmethod:gcForest2023/11/4EnsembleLearningLesson7-36BoostingBoosting
isa
machinelearningensemble
meta-algorithm
forprimarilyreducing
bias,andalsovariancein
supervisedlearning,andafamilyofmachinelearningalgorithmswhichconvertweaklearnerstostrongones.Boosting
alsocreatesanensembleofclassifiersbyresamplingthedata,whicharethencombinedbymajorityvotinginboosting,resamplingisstrategicallygearedtoprovidethemostinformativetrainingdata(最具信息的訓(xùn)練數(shù)據(jù),即前面分類器預(yù)測錯誤的訓(xùn)練數(shù)據(jù))foreachconsecutiveclassifier2023/11/4EnsembleLearningLesson7-37Boosting[Schapire,1989]2023/11/4EnsembleLearningLesson7-38AdaBoostAdaBoost
(AdaptiveBoosting)extendsboostingtomulti-classandregressionproblems.
usingre-weightinsteadofresampling,andadaptivelyweigheachdataexample.Dataexampleswhicharewronglyclassifiedgethighweight(thealgorithmwillfocusonthem)Eachboostingroundlearnsanew(simple)classifierontheweigheddataset.Theseclassifiersareweighedtocombinethemintoasinglepowerfulclassifier.2023/11/4EnsembleLearningLesson7-392023/11/4EnsembleLearningLesson7-40EnsembleLearningIntroductionCommonlyusedensemblelearningalgorithmsBaggingRandomforestBoostingsklearn.ensemble:EnsembleMethods2023/11/4EnsembleLearningLesson7-41sklearn.ensemble:EnsembleMethodsThe
sklearn.ensemble
moduleincludesensemble-basedmethodsforclassification,regressionandanomalydetection.2023/11/4EnsembleLearningLesson7-42ensemble.AdaBoostClassifier([…])AnAdaBoostclassifier.ensemble.AdaBoostRegressor([base_estimator,
…])AnAdaBoostregressor.ensemble.BaggingClassifier([base_estimator,
…])ABaggingclassifier.ensemble.BaggingRegressor([base_estimator,
…])ABaggingregressor.ensemble.RandomForestClassifier([…])Arandomforestclassifier.ensemble.RandomForestRegressor([…])Arandomforestregressor.ensemble.RandomTreesEmbedding([…])Anensembleoftotallyrandomtrees.ensemble.VotingClassifier(estimators[,
…])SoftVoting/MajorityRuleclassifierforunfittedestimators.sklearn.ensemble:EnsembleMethodsclass
sklearn.ensemble.BaggingClassifier(base_estimator=None,
n_estimators=10,
max_samples=1.0,
max_features=1.0,
bootstrap=True,
bootstrap_features=False,
oob_score=False,
warm_start=False,
n_jobs=None,
random_state=None,
verbose=0)Thisalgorithmencompassesseveralworksfromtheliterature.Whenrandomsubsetsofthedatasetaredrawnasrandomsubsetsofthesamples,thenthisalgorithmisknownasPasting
[1].Ifsamplesaredrawnwithreplacement,thenthemethodisknownasBagging
[2].Whenrandomsubsetsofthedatasetaredrawnasrandomsubsetsofthefeatures,thenthemethodisknownasRandomSubspaces
[3].Finally,whenbaseestimatorsarebuiltonsubsetsofbothsamplesandfeatures,thenthemethodisknownasRandomPatches
[4].2023/11/4EnsembleLearningLesson7-43sklearn.ensemble:EnsembleMethodsclass
sklearn.ensemble.RandomForestClassifier(n_estimators=’warn’,
criterion=’gini’,
max_depth=None,
min_samples_split=2,
min_samples_leaf=1,
min_weight_fraction_leaf=0.0,
max_features=’auto’,
max_
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 浙江小學(xué)五年級上冊奧數(shù)單選題100道及答案
- 小學(xué)生心理健康家庭教育講座
- 建筑設(shè)計(jì)大師解析
- 新年版面設(shè)計(jì)規(guī)范
- 漢語介紹課件
- 小寒課件介紹
- 衛(wèi)生資格考試考生經(jīng)驗(yàn)交流試題與答案
- 執(zhí)業(yè)護(hù)士考試心理素質(zhì)提升試題及答案
- 醫(yī)學(xué)界動態(tài)趨勢執(zhí)業(yè)醫(yī)師考試試題及答案
- 民警職業(yè)教育培訓(xùn)課件
- 新能源系統(tǒng) 課件 第10章 多能互補(bǔ)、可持續(xù)能源系統(tǒng)
- 井下動火安全技術(shù)措施
- 理解詞語句子的方法PPT
- 熱線心理咨詢技術(shù)-課件
- 碰撞與沖擊動力學(xué)
- 全等三角形第一課時(shí)課件
- 歌曲《我們》歌詞
- 頸部腫塊診斷及鑒別診斷課件
- 汽車前保險(xiǎn)杠結(jié)構(gòu)及安全能分析學(xué)士學(xué)位參考
- 配電室八項(xiàng)制度(八張)
- 清算方案模板9篇
評論
0/150
提交評論