I am trying to classify my data using decision trees, the issue is the tree has no branches it has only root node. I do not understand the mistake.
All the variables are set as factors (0/1)
could any one find the mistake.. My code is as below
dt3<-rpart(v33 ~v37+v15+v16+v36+v39+v40+v42+v44+v48+v50+v51+v52+v56+v57+v58+v59+v60+v62+v63+v66+v68+v69,method="class", na.action = na.pass, data = nd)
the result is as follows
Call:
rpart(formula = v33 ~ v37 + v15 + v16 + v36 + v39 + v40 + v42 +
v44 + v48 + v50 + v51 + v52 + v56 + v57 + v58 + v59 + v60 +
v62 + v63 + v66 + v68 + v69, data = nd, na.action = na.pass,
method = "class", control = rpart.control(usesurrogate = 1,
minsplit = 1, cp = 0.001))
n= 43586
CP nsplit rel error xerror xstd
1 0 0 1 0 0
Node number 1: 43586 observations
predicted class=0 expected loss=0.1944431698 P(node) =1
class counts: 35111 8475
probabilities: 0.806 0.194