I've noted that quite a few of the node splits in my Random Trees are redundant since both child nodes have identical classifications. I suspect this is caused by an unfortunate choice of parameters, but which?
I'm using the OpenCV implementation to generate the trees; for prediction I use my own code. That's how I discovered these redundant nodes. The OpenCV trainings parameters are:
- max_depth = 20
- min_sample_count = 7
- nactive_vars = 2
- max_num_trees = 250
- forest_accuracy = 0
- term_crit = CV_TERMCRIT_ITER (i.e. 250 trees)
I have +/- 50.000 samples, 25 variables per sample and 7 classes. No missing variables, no categorical variables. The problem with redundant nodes appears with nodes much shallow than
max_depth so that's probably not relevant.