search for: colnamesused

Displaying 1 result from an estimated 1 matches for "colnamesused".

2008 Feb 26
1
predict.rpart question
...trees and I deal with data with relatively large number of input variables (predictors). For example, I build an rpart model like this rpartModel <- rpart(Y ~ X, method="class", minsplit =1, minbucket=nMinBucket,cp=nCp); and get predictors used in building the model like this colnamesUsed<-unique(rownames(rpartModel$splits)); When later I apply the rpart model to predict the new data I strip the input data from unneccessary columns and only use X columns that exist in colnamesUsed. Unfortunately I get error message like this Error: variable 'X' was fitted with type &...