Reputation: 29
What is the "elements" of a random forest classifier in R?
Why does the "elements" always equal 19 no matter what data set, what number of features I use?
For example, in my R Studio Environment:
Name of the R object Description
rf_goodjunk Large randomForest.formula (19 elements, 24.9 Mb)
rf_more Large randomForest.formula (19 elements, 18.9 Mb)
rf_1 Large randomForest.formula (19 elements, 12.6 Mb)
rf_2 Large randomForest.formula (19 elements, 15.2 Mb)
rf_3 Large randomForest.formula (19 elements, 13.2 Mb)
Upvotes: 2
Views: 81
Reputation: 5109
Random forest returns a list objet, containing several elements which always will be 19 if the function return 19 elements.
The number you refer to describes the number of elements inside a precise list, and is not due to Random Forest particularly, but is a standard behavior.
For example, l <- lm(Sepal.Length ~ Sepal.Width, data = iris)
returns a list of 12 elements : the coefficient, the residuals, etc...
Upvotes: 1