1
$\begingroup$

I have been trying to build a model based on random forest, and have the made the model deterministic by setting the seed before calling randomForest function. After I get the random forest model, I created predictions for the model. The prediction values are different between when importance is set as true and false.

$\endgroup$
0
$\begingroup$

When we set the randomForest method to calculate importance, the code to calculate importance calls up the random number generator to generate a random number, thus changing the sequence in which the random number generator is called. I set the seed, but the sequence has been changed, hence the difference in predictions.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.