How can I see the algorithm of a randomForest in R?
I have tried with:
library(randomForest)
radomForest
But the output I´ve got is:
function (x, ...)
UseMethod("randomForest")
<environment: namespace:randomForest>
Thanks!
You don't see much there, b/c randomForest is a S3 function and calls different functions depending on the class of the input you provide to the algorithm.
Typing randomForest:::randomForest.default gives you more information.
However, I assume that parts of the functions used therein are written in C or Fortran. To see all the code, there is a GitHub mirror of the cran package here: https://github.com/cran/randomForest
Note: methods(randomForest) returns the available methods of a S3 generic function. In this case:
methods(randomForest)
## [1] randomForest.default* randomForest.formula*