why classification trees doesn't give a single split?

37 Views Asked by At

I want to come up with a decision tree with a single split. But with the following code, the node is not split.

       dt<-rpart(data$y ~ . , data = data,
       control = rpart.control(minsplit=1,maxdepth = 1),
       parms = list(split = "information"))

The result was;

  1. root 46 1 Iris-virginica (0.02173913 0.97826087) *

What is the reason for that and how can I develop a classification tree with a single split?

0

There are 0 best solutions below