资源描述:
《r statistical application development classification》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、9ClassificationandRegressionTreesInthepreviouschapters,wefocusedonregressionmodels,andthemajorityoftheemphasiswasonthelinearityassumption.Inwhatappearsasthenextextensionmustbenon-linearmodels,wewillinsteaddeviatetorecursivepartitioningtechniques,whichareabitmoreflexiblethanthenon-lineargeneraliza
2、tionofthemodelsconsideredintheearlierchapters.Ofcourse,therecursivepartitioningtechniques,inmostcases,maybeviewedasnon-linearmodels.Wewillfirstintroducethenotionofrecursivepartitionsthroughahypotheticaldataset.Itisapparentthattheearlierapproachofthelinearmodelschangesinanentirelydifferentwaywitht
3、hefunctioningoftherecursivepartitions.Recursivepartitioningdependsuponthetypeofproblemwehaveinhand.Wedeveloparegressiontreefortheregressionproblemwhentheoutputisacontinuousvariable,asinthelinearmodels.Iftheoutputisabinaryvariable,wedevelopaclassificationtree.Aregressiontreeisfirstcreatedbyusingth
4、erpartfunctionfromtherpartpackage.AveryrawRprogramiscreated,whichclearlyexplainstheunfoldingofaregressiontree.Asimilareffortisrepeatedfortheclassificationtree.Inthefinalsectionofthischapter,aclassificationtreeiscreatedfortheGermancreditdataproblemalongwiththeuseofROCcurvesforunderstandingthemodel
5、performance.Theapproachinthischapterwillbeonthefollowinglines:UnderstandingthebasisofrecursivepartitionsandthegeneralCART.ConstructionofaregressiontreeConstructionofaclassificationtreeApplicationofaclassificationtreetotheGermancreditdataproblemThefineraspectsofCARTClassificationandRegressionRecur
6、sivepartitionsThenameofthelibrarypackagerpart,shippedalongwithR,standsforRecursivePartitioning.ThepackagewasfirstcreatedbyTerryMTherneauandBethAtkinson,andiscurrentlymaintainedbyBrianRipley.Wewillfirsthaveapeekatmeansrecursivepartitionsare.Acomplexandcontrivedrelationshipisgenerallynotidentifiabl
7、ebylinearmodels.Inthepreviouschapter,wesawtheextensionsofthelinearmodelsinpiecewise,polynomial,andsplineregressionmodels.Itisalsowellknownthatiftheorderofamodelislargerthan4,theninterpretationandusabilityofthemodelbeco