I am playing with rpart. I am using a play data set of a bank with 5000 rows, with 7 IVs and the class has 2 factors.
the original model is (no control arguments set):
UB_rpart <- rpart(UB_tree, method="class", data=UBank_train)
I then create a tree in rpart.plot without issue.
Then I try to prune the tree some with adding some control arguments:
Pruned_UB_rpart <-prune(UB_rpart,cp=.01, minsplit=10, minbucket=round(minsplit/3))
I plot the pruned tree and it looks identical to the first tree. I keep changing minsplit (even up to 1000), to see when it changes. The tree never does not change.
However when I change cp to .05, then the tree changes.
SO why is minsplit not pruning the tree. Am I not using it right?