1
$\begingroup$

This has already been asked and answered, but one of the answers didn't explain why a certain technique worked.

So my question is "Why does calling randomForest(predictors, decision) instead of the normal (decision~ predictors) reducing running time?

$\endgroup$
  • $\begingroup$ For data sets with something like less than ~2.000.000 fields, e.g. 4000 samples and 500 variables, I don't think the time difference is very noticeable. $\endgroup$ – Soren Havelund Welling Aug 3 '15 at 22:01
1
$\begingroup$

from randomForest help file:

For large data sets, especially those with large number of variables, calling randomForest via the formula interface is not advised: There may be too much overhead in handling the formula.

The algorithms for the package randomForest is implemented in C. The R formula interface is not compatible with C. Before running low level algorithms the data must be ordered in a numeric feature matrix(X) and a target vector(y).

$\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.