Hello community,
When I use rfcv command for feature selection in regression random forest, I've got the different results in everytime even I set seed..
Also, when I make the model using features with the lowest error, the % Var explained value is too low (less than 10 and also I've got less than 0 values..).
I have no idea how can I fix it..
Please help me with your valuable comments.
Best,
set.seed(1234)
rf.cv <- randomForest::rfcv(train_x, train_y, cv.fold = 100, trees=500)
with(rf.cv, plot(n.var, error.cv, log="x", type="o", lwd=2))
model <- randomForest(BMI ~., data = train)
Call:
randomForest(formula = BMI ~ ., data = train)
Type of random forest: regression
Number of trees: 500
No. of variables tried at each split: 59
Mean of squared residuals: 21.86583
% Var explained: 3.85