What is the default num_estimators in scikit-learn's RandomForest?

machine_learning
random_forest

#1

If we do not define number of trees to be built in random forest then how many trees
random forest internally creates?


#2

Hey @chaitu,

If you see the RF Classifier documentation in sklearn(python),
58
The default number of trees is 10
http://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html

Hope this helps :slight_smile:
Sanad


#3

Hi @mohdsanadzakirizvi ,

Thank you so much. That really helps :slightly_smiling_face:
Could you please let me know if this value is the same for the parameter ntree in the function randomForest in R programming.

Thank you,
Eeswara Chaitanya


#4

The default value for ntree in R RandomForest function is 500.