Lee Frederick Schroeder
2013-Jan-10 22:26 UTC
[R] RPART: Including the expense of predictor variables
I know that rpart has a complexity parameter that adjusts the number of nodes in a model. I also know that a loss function allows one to weight misclassifications of different types. However, some of my predictor variables are much more expensive dollar-wise to use than others. Is there a way to weight the predictor variables such that rpart will not use an expensive variable (or will only send limited fractions of the population to the node) if there is not a comparatively large decrease in misclassifications after splitting by that variable? Thanks, Lee