版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
FoundationsofMachineLearning
EnsembleLearning(集成學(xué)習)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é)習).Incontrasttoordinarymachinelearningapproacheswhichtrytolearnonehypothesisfromtrainingdata,ensemblemethodstrytoconstructasetofhypothesisandcombinethemtouse2023/11/4EnsembleLearningLesson7-6Definition2023/11/4EnsembleLearningLesson7-7DefinitionIndividuallearners(個體學(xué)習器)areanumberoflearnersusedinanensembleBaselearners(基學(xué)習器)theindividuallearnersthatareusuallygeneratedfromtrainingdatabyasinglebaselearningalgorithmtoproduceahomogeneousensemble.Componentlearners(組件學(xué)習器)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(使用隨機選擇的特征子集來選擇最佳分割特征)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)過處理后傳給下一層。每一層都是一個決策樹深林的總體,也就是由多個隨機深林組成。隨機深林的類型越多越好。論文中給定的有兩種類型的隨機深林,藍色表示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)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度智慧城市建設(shè)個人工勞務(wù)分包合同4篇
- 2025年物業(yè)經(jīng)營托管與設(shè)施設(shè)備更新改造合同3篇
- 二零二五年度商業(yè)街區(qū)租賃管理合同3篇
- 2025年西瓜種植與農(nóng)村電商平臺合作承包協(xié)議3篇
- 2025年度個人收藏品買賣合同樣本3篇
- 二零二五年護理員勞動合同范本(含離職手續(xù))3篇
- 2025年物流企業(yè)物流園區(qū)消防安全管理合同3篇
- 2025年新媒體信息推廣業(yè)務(wù)合作協(xié)議3篇
- 天橋安全施工方案
- 二零二五年度美容院美容院形象設(shè)計與裝修合同4篇
- 醫(yī)學(xué)脂質(zhì)的構(gòu)成功能及分析專題課件
- 高技能人才培養(yǎng)的策略創(chuàng)新與實踐路徑
- 數(shù)列練習題(含答案)基礎(chǔ)知識點
- 人教版(2024新版)七年級上冊英語期中+期末學(xué)業(yè)質(zhì)量測試卷 2套(含答案)
- 2024年湖北省中考數(shù)學(xué)試卷(含答案)
- 油煙機清洗安全合同協(xié)議書
- 2024年云南省中考數(shù)學(xué)試題(原卷版)
- 污水土地處理系統(tǒng)中雙酚A和雌激素的去除及微生物研究
- 氣胸病人的護理幻燈片
- 《地下建筑結(jié)構(gòu)》第二版(朱合華)中文(2)課件
- JB T 7946.1-2017鑄造鋁合金金相
評論
0/150
提交評論