I am working with the method randomForest for model building. And for a good model performance, it is very important to select the right features. At my example I have 30 variables and I would like to try to build different models with all possible combination with the given features, to choose at the and the best performed model. I am working with R and my question is if someone knows a method which could perform all feature combination as training data for model building thanks
Asked
Active
Viewed 108 times
2 Answers
1
This is an impossible task in any programming language.
You have 30 features. There are therefore $2^{30}$ possible combinations of features.
$2^{30} = 1,073,741,824$.
If you fit one model a second, you'll be done in $298,261.68$ hours, or about 34 years (give or take a few days due to leap years).
Therefore you need a different feature selection approach. And that question has been asked before: Feature selection with Random Forests
shadowtalker
- 12,551