From 226704aba7f0379e1c7558250d21b69039761816 Mon Sep 17 00:00:00 2001 From: Hung-Hsuan Chen Date: Wed, 9 Oct 2024 10:02:39 +0800 Subject: [PATCH] DOC: RandomForestClassifier depends on DecisionTreeClassifier, not DecisionTreeRegressor --- sklearn/ensemble/_forest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/ensemble/_forest.py b/sklearn/ensemble/_forest.py index ccc1b3b367a86..f57a5a9a61f5d 100644 --- a/sklearn/ensemble/_forest.py +++ b/sklearn/ensemble/_forest.py @@ -1180,7 +1180,7 @@ class RandomForestClassifier(ForestClassifier): classifiers on various sub-samples of the dataset and uses averaging to improve the predictive accuracy and control over-fitting. Trees in the forest use the best split strategy, i.e. equivalent to passing - `splitter="best"` to the underlying :class:`~sklearn.tree.DecisionTreeRegressor`. + `splitter="best"` to the underlying :class:`~sklearn.tree.DecisionTreeClassifier`. The sub-sample size is controlled with the `max_samples` parameter if `bootstrap=True` (default), otherwise the whole dataset is used to build each tree.