8000 Address Guillaiume's comment · scikit-learn/scikit-learn@0ca3a4e · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ca3a4e

Browse files
committed
Address Guillaiume's comment
1 parent 311f5ae commit 0ca3a4e

File tree

3 files changed

+48
-57
lines changed

3 files changed

+48
-57
lines changed

sklearn/ensemble/forest.py

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -808,13 +808,12 @@ class RandomForestClassifier(ForestClassifier):
808808
If None then unlimited number of leaf nodes.
809809
810810
min_impurity_decrease : float, optional (default=0.)
811-
Threshold for early stopping in tree growth. A node will be split
812-
if the impurity decrease due to the splitting, is greater than or equal
813-
to this value. If not, the node is marked as a leaf.
811+
A node will be split if this split induces a decrease of the impurity
812+
greater than or equal to this value.
814813
815-
The impurity decrease due to a potential split is the difference in the
816-
parent node's impurity and the weighted average of impurities of the
817-
node's children, as given by this potential split.
814+
The impurity decrease is the difference in the parent node's impurity
815+
and the weighted average of impurities of the node's children, as
816+
given by this potential split.
818817
819818
The sample counts of each child is used to weigh the impurity of the
820819
child for averaging the impurity.
@@ -1031,13 +1030,12 @@ class RandomForestRegressor(ForestRegressor):
10311030
If None then unlimited number of leaf nodes.
10321031
10331032
min_impurity_decrease : float, optional (default=0.)
1034-
Threshold for early stopping in tree growth. A node will be split
1035-
if the impurity decrease due to the splitting, is greater than or equal
1036-
to this value. If not, the node is marked as a leaf.
1033+
A node will be split if this split induces a decrease of the impurity
1034+
greater than or equal to this value.
10371035
1038-
The impurity decrease due to a potential split is the difference in the
1039-
parent node's impurity and the weighted average of impurities of the
1040-
node's children, as given by this potential split.
1036+
The impurity decrease is the difference in the parent node's impurity
1037+
and the weighted average of impurities of the node's children, as
1038+
given by this potential split.
10411039
10421040
The sample counts of each child is used to weigh the impurity of the
10431041
child for averaging the impurity.
@@ -1214,13 +1212,12 @@ class ExtraTreesClassifier(ForestClassifier):
12141212
If None then unlimited number of leaf nodes.
12151213
12161214
min_impurity_decrease : float, optional (default=0.)
1217-
Threshold for early stopping in tree growth. A node will be split
1218-
if the impurity decrease due to the splitting, is greater than or equal
1219-
to this value. If not, the node is marked as a leaf.
1215+
A node will be split if this split induces a decrease of the impurity
1216+
greater than or equal to this value.
12201217
1221-
The impurity decrease due to a potential split is the difference in the
1222-
parent node's impurity and the weighted average of impurities of the
1223-
node's children, as given by this potential split.
1218+
The impurity decrease is the difference in the parent node's impurity
1219+
and the weighted average of impurities of the node's children, as
1220+
given by this potential split.
12241221
12251222
The sample counts of each child is used to weigh the impurity of the
12261223
child for averaging the impurity.
@@ -1436,13 +1433,12 @@ class ExtraTreesRegressor(ForestRegressor):
14361433
If None then unlimited number of leaf nodes.
14371434
14381435
min_impurity_decrease : float, optional (default=0.)
1439-
Threshold for early stopping in tree growth. A node will be split
1440-
if the impurity decrease due to the splitting, is greater than or equal
1441-
to this value. If not, the node is marked as a leaf.
1436+
A node will be split if this split induces a decrease of the impurity
1437+
greater than or equal to this value.
14421438
1443-
The impurity decrease due to a potential split is the difference in the
1444-
parent node's impurity and the weighted average of impurities of the
1445-
node's children, as given by this potential split.
1439+
The impurity decrease is the difference in the parent node's impurity
1440+
and the weighted average of impurities of the node's children, as
1441+
given by this potential split.
14461442
14471443
The sample counts of each child is used to weigh the impurity of the
14481444
child for averaging the impurity.
@@ -1605,13 +1601,12 @@ class RandomTreesEmbedding(BaseForest):
16051601
If None then unlimited number of leaf nodes.
16061602
16071603
min_impurity_decrease : float, optional (default=0.)
1608-
Threshold for early stopping in tree growth. A node will be split
1609-
if the impurity decrease due to the splitting, is greater than or equal
1610-
to this value. If not, the node is marked as a leaf.
1604+
A node will be split if this split induces a decrease of the impurity
1605+
greater than or equal to this value.
16111606
1612-
The impurity decrease due to a potential split is the difference in the
1613-
parent node's impurity and the weighted average of impurities of the
1614-
node's children, as given by this potential split.
1607+
The impurity decrease is the difference in the parent node's impurity
1608+
and the weighted average of impurities of the node's children, as
1609+
given by this potential split.
16151610
16161611
The sample counts of each child is used to weigh the impurity of the
16171612
child for averaging the impurity.

sklearn/ensemble/gradient_boosting.py

Lines changed: 13 additions & 15 deletions
-
if the impurity decrease due to the splitting, is greater than or equal
Original file line numberDiff line numberDiff line change
@@ -1324,21 +1324,20 @@ class GradientBoostingClassifier(BaseGradientBoosting, ClassifierMixin):
13241324
Best nodes are defined as relative reduction in impurity.
13251325
If None then unlimited number of leaf nodes.
13261326
1327-
min_impurity_decrease : float, optional (default=1e-7)
1328-
Threshold for early stopping in tree growth. A node will be split
1329-
if the impurity decrease due to the splitting, is greater than or equal
1330-
to this value. If not, the node is marked as a leaf.
1327+
min_impurity_decrease : float, optional (default=0.)
1328+
A node will be split if this split induces a decrease of the impurity
1329+
greater than or equal to this value.
13311330
1332-
The impurity decrease due to a potential split is the difference in the
1333-
parent node's impurity and the weighted average of impurities of the
1334-
node's children, as given by this potential split.
1331+
The impurity decrease is the difference in the parent node's impurity
1332+
and the weighted average of impurities of the node's children, as
1333+
given by this potential split.
13351334
13361335
The sample counts of each child is used to weigh the impurity of the
13371336
child for averaging the impurity.
13381337
13391338
.. versionadded:: 0.19
13401339
1341-
init : BaseEstimator, None, optional (default=None)
1340+
init : BaseEstimator, None, optional (default=None)
13421341
An estimator object that is used to compute the initial
13431342
predictions. ``init`` has to provide ``fit`` and ``predict``.
13441343
If None it uses ``loss.init_estimator``.
@@ -1717,14 +1716,13 @@ class GradientBoostingRegressor(BaseGradientBoosting, RegressorMixin):
17171716
Best nodes are defined as relative reduction in impurity.
17181717
If None then unlimited number of leaf nodes.
17191718
1720-
min_impurity_decrease : float, optional (default=1e-7)
1721-
Threshold for early stopping in tree growth. A node will be split
1722
1723-
to this value. If not, the node is marked as a leaf.
1719+
min_impurity_decrease : float, optional (default=0.)
1720+
A node will be split if this split induces a decrease of the impurity
1721+
greater than or equal to this value.
17241722
1725-
The impurity decrease due to a potential split is the difference in the
1726-
parent node's impurity and the weighted average of impurities of the
1727-
node's children, as given by this potential split.
1723+
The impurity decrease is the difference in the parent node's impurity
1724+
and the weighted average of impurities of the node's children, as
1725+
given by this potential split.
17281726
17291727
The sample counts of each child is used to weigh the impurity of the
17301728
child for averaging the impurity.

sklearn/tree/tree.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -607,13 +607,12 @@ class DecisionTreeClassifier(BaseDecisionTree, ClassifierMixin):
607607
by `np.random`.
608608
609609
min_impurity_decrease : float, optional (default=0.)
610-
Threshold for early stopping in tree growth. A node will be split
611-
if the impurity decrease due to the splitting, is greater than or equal
612-
to this value. If not, the node is marked as a leaf.
610+
A node will be split if this split induces a decrease of the impurity
611+
greater than or equal to this value.
613612
614-
The impurity decrease due to a potential split is the difference in the
615-
parent node's impurity and the weighted average of impurities of the
616-
node's children, as given by this potential split.
613+
The impurity decrease is the difference in the parent node's impurity
614+
and the weighted average of impurities of the node's children, as
615+
given by this potential split.
617616
618617
The sample counts of each child is used to weigh the impurity of the
619618
child for averaging the impurity.
@@ -918,13 +917,12 @@ class DecisionTreeRegressor(BaseDecisionTree, RegressorMixin):
918917
by `np.random`.
919918
920919
min_impurity_decrease : float, optional (default=0.)
8BB9 921-
Threshold for early stopping in tree growth. A node will be split
922-
if the impurity decrease due to the splitting, is greater than or equal
923-
to this value. If not, the node is marked as a leaf.
920+
A node will be split if this split induces a decrease of the impurity
921+
greater than or equal to this value.
924922
925-
The impurity decrease due to a potential split is the difference in the
926-
parent node's impurity and the weighted average of impurities of the
927-
node's children, as given by this potential split.
923+
The impurity decrease is the difference in the parent node's impurity
924+
and the weighted average of impurities of the node's children, as
925+
given by this potential split.
928926
929927
The sample counts of each child is used to weigh the impurity of the
930928
child for averaging the impurity.

0 commit comments

Comments
 (0)
0