Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4ab89c5

Browse files
committed
upd randomforest docstring
1 parent 19a1528 commit 4ab89c5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sklearn/ensemble/forest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,9 @@ class RandomForestClassifier(ForestClassifier):
694694
A random forest is a meta estimator that fits a number of decision tree
695695
classifiers on various sub-samples of the dataset and use averaging to
696696
improve the predictive accuracy and control over-fitting.
697+
The sub-sample size is always the same as the original
698+
input sample size but the samples are drawn with replacement if
699+
`bootstrap=True` (default).
697700
698701
Read more in the :ref:`User Guide <forest>`.
699702
@@ -715,7 +718,7 @@ class RandomForestClassifier(ForestClassifier):
715718
`int(max_features * n_features)` features are considered at each
716719
split.
717720
- If "auto", then `max_features=sqrt(n_features)`.
718-
- If "sqrt", then `max_features=sqrt(n_features)`.
721+
- If "sqrt", then `max_features=sqrt(n_features)` (same as "auto").
719722
- If "log2", then `max_features=log2(n_features)`.
720723
- If None, then `max_features=n_features`.
721724
@@ -883,6 +886,9 @@ class RandomForestRegressor(ForestRegressor):
883886
A random forest is a meta estimator that fits a number of classifying
884887
decision trees on various sub-samples of the dataset and use averaging
885888
to improve the predictive accuracy and control over-fitting.
889+
The sub-sample size is always the same as the original
890+
input sample size but the samples are drawn with replacement if
891+
`bootstrap=True` (default).
886892
887893
Read more in the :ref:`User Guide <forest>`.
888894

0 commit comments

Comments
 (0)