Classification and regression trees by Breiman et al mentioned about using linear combination of predictors when splitting a node. I was trying to find a way to try this out with R in vain.
There are tree or rpart packages which assume splitting on an univariate predictor and they do not allow any customization with linear combination. Do I have to create my own package?
I haven’t used it before, but you might have a look at the oblique.tree package on CRAN.
The example in
?oblique.treedoes in fact add the PCA output at covariates,yielding data that looks like this:
where the covariates are the 2nd and 3rd principal components. It can then apparently fit a decision tree that splits on linear combinations of these variables: