Stat841f09 Wiki Course Notes

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: strategy is to average these class probabilities instead of the final classifiers. This approach can produce bagged estimates with lower variance and usually better performance. References: Breiman L, Bagging Predictors, Machine Learning, 24, 123–140 (1996) Example Random Fore s ts wikicour Stat841&pr intable= yes 73/74 10/09/2013 Stat841 - Wiki Cour se Notes A classifier consisting of a collection of tree–structured classifiers where θk are independently and identically distributed random vectors. The nature and dimensionality of θ depends on its use in the tree construction. Bagging is such an example. Currently, random forest use randomly selected inputs or combinations of inputs at each node to grow the tree. How to compare without a test set? Randomly partition the data into 10% and 90% sets. Use the 90% as training data, to grow tree model using cross validation (1- se rule) and also grow a random forest. Then predict the 10% test data. Repeat the procedure 100 times and average the result.R code is as follows. >misv.tree<- rep(0,100); >sizev.tree<- rep(0,100); >misv.forest<- rep(0,100); >for (j in 1:100) { ls<sml(e(:8)7,elc=) it-apesq163,0rpaeF tan-aafaeb[ ls,) ri<dt.rm(c- it]; ts<dt.rm(cls,) et-aafaeb[it] t0-pr(atrY~,aatan cnrlratcnrl mnpi=0 mnukt5 c=.,vl1) r<ratfco().dt=ri, oto=pr.oto( islt1, ibce=, p00xa=0) x-rnc(r) <pitpt0 b<x12+; s-[,]1 mn-[,] i<x14; cv-[,] p<x11; sd<x15 te-[,] fr( i 1lnt([1) o i n :eghx,]) { i([,]mn) fxi4<i { mn-[,] i<xi4 b<xi2+ s-[,]1 cv-[,] p<xi1 sd<xi5 te-[,] } } lmt-i+te ; ii<mnsd idxne<0 ; frii 1lnt([1) o( n :eghx,]) { i(ne<) fidx1{ i([,]lmt fxi4>ii) { b<xi12+ s-[+,]1 cv-[+,] p<xi11 } es idx- } le ne<2 } t<puet0c=p) #puete r-rn(r,pcv rn re ft<peitt,edt=ettp=cas) iy-rdc(rnwaats,ye'ls' tbe-al(et,]ft) al<tbets[1,iy ms-al[,]tbe21 i<tbe12+al[,] ms.rej<ms ivte-i szvte-s ie.rej<b frs<rnoFrs(atrY~,aatanmr=,te=0)#rno frs oet-admoetfco().dt=ri,ty4nre10 adm oet ft<peitfrs,edt=ettp=cas) iy-rdc(oetnwaats,ye'ls' tbe-al(et,]ft) al<tbets[1,iy ms-al[,]tbe21 i<tbe12+al[,] ms.oetj<ms ivfrs-i } Retrieved from "" This page was last modified on 18 October 2011, at 06:47. Launched by Mohammad Derakhshani wikicour Stat841&pr intable= yes 74/74...
View Full Document

This document was uploaded on 03/07/2014.

Ask a homework question - tutors are online