Spliting a Node in a Tree

Arthur Charpentier · OpenEdition (OpenEdition) · 2015

If we grow a tree with standard functions in R, on the same dataset used to introduce classification tree in some previous post, MYOCARDE=read.table( + "http://freakonometrics.free.fr/saporta.csv", + head=TRUE,sep=";") library(rpart) cart-rpart(PRONO~.,data=MYOCARDE) we get library(rpart.plot) library(rattle) prp(cart,type=2,extra=1) The first step is to split the first node (based on the whole dataset). To split it, we can use either Gini index gini=function(y,classe){ + T=table(y,cl...

Read the paper · More papers on PaperTik