R Caret's rfe [Error in { : task 1 failed - “rfe is expecting 184 importance values but only has 2”]
I am using Caret's rfe for a regression application. My data (in data.table ) has 176 predictors (including 49 factor predictors). When I run the function, I get this error: Error in { : task 1 failed - "rfe is expecting 176 importance values but only has 2" Then, I used model.matrix( ~ . - 1, data = as.data.frame(train_model_sell_single_bid)) to convert the factor predictors to dummy variables. However, I got similar error: Error in { : task 1 failed - "rfe is expecting 184 importance values but only has 2" I'm using R version 3.1.1 on Windows 7 (64-bit), Caret version 6.0-41. I also have