Skip to content

Commit cc600b4

Browse files
luispedrojnothman
authored andcommitted
DOC use "fraction" and not "percentage" (scikit-learn#10653)
Percentage would imply that the value would be divided by 100.
1 parent 49da6c8 commit cc600b4

File tree

3 files changed

+54
-54
lines changed

3 files changed

+54
-54
lines changed

sklearn/ensemble/forest.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ class RandomForestClassifier(ForestClassifier):
767767
The number of features to consider when looking for the best split:
768768
769769
- If int, then consider `max_features` features at each split.
770-
- If float, then `max_features` is a percentage and
770+
- If float, then `max_features` is a fraction and
771771
`int(max_features * n_features)` features are considered at each
772772
split.
773773
- If "auto", then `max_features=sqrt(n_features)`.
@@ -788,23 +788,23 @@ class RandomForestClassifier(ForestClassifier):
788788
The minimum number of samples required to split an internal node:
789789
790790
- If int, then consider `min_samples_split` as the minimum number.
791-
- If float, then `min_samples_split` is a percentage and
791+
- If float, then `min_samples_split` is a fraction and
792792
`ceil(min_samples_split * n_samples)` are the minimum
793793
number of samples for each split.
794794
795795
.. versionchanged:: 0.18
796-
Added float values for percentages.
796+
Added float values for fractions.
797797
798798
min_samples_leaf : int, float, optional (default=1)
799799
The minimum number of samples required to be at a leaf node:
800800
801801
- If int, then consider `min_samples_leaf` as the minimum number.
802-
- If float, then `min_samples_leaf` is a percentage and
802+
- If float, then `min_samples_leaf` is a fraction and
803803
`ceil(min_samples_leaf * n_samples)` are the minimum
804804
number of samples for each node.
805805
806806
.. versionchanged:: 0.18
807-
Added float values for percentages.
807+
Added float values for fractions.
808808
809809
min_weight_fraction_leaf : float, optional (default=0.)
810810
The minimum weighted fraction of the sum total of weights (of all
@@ -1045,7 +1045,7 @@ class RandomForestRegressor(ForestRegressor):
10451045
The number of features to consider when looking for the best split:
10461046
10471047
- If int, then consider `max_features` features at each split.
1048-
- If float, then `max_features` is a percentage and
1048+
- If float, then `max_features` is a fraction and
10491049
`int(max_features * n_features)` features are considered at each
10501050
split.
10511051
- If "auto", then `max_features=n_features`.
@@ -1066,23 +1066,23 @@ class RandomForestRegressor(ForestRegressor):
10661066
The minimum number of samples required to split an internal node:
10671067
10681068
- If int, then consider `min_samples_split` as the minimum number.
1069-
- If float, then `min_samples_split` is a percentage and
1069+
- If float, then `min_samples_split` is a fraction and
10701070
`ceil(min_samples_split * n_samples)` are the minimum
10711071
number of samples for each split.
10721072
10731073
.. versionchanged:: 0.18
1074-
Added float values for percentages.
1074+
Added float values for fractions.
10751075
10761076
min_samples_leaf : int, float, optional (default=1)
10771077
The minimum number of samples required to be at a leaf node:
10781078
10791079
- If int, then consider `min_samples_leaf` as the minimum number.
1080-
- If float, then `min_samples_leaf` is a percentage and
1080+
- If float, then `min_samples_leaf` is a fraction and
10811081
`ceil(min_samples_leaf * n_samples)` are the minimum
10821082
number of samples for each node.
10831083
10841084
.. versionchanged:: 0.18
1085-
Added float values for percentages.
1085+
Added float values for fractions.
10861086
10871087
min_weight_fraction_leaf : float, optional (default=0.)
10881088
The minimum weighted fraction of the sum total of weights (of all
@@ -1276,7 +1276,7 @@ class ExtraTreesClassifier(ForestClassifier):
12761276
The number of features to consider when looking for the best split:
12771277
12781278
- If int, then consider `max_features` features at each split.
1279-
- If float, then `max_features` is a percentage and
1279+
- If float, then `max_features` is a fraction and
12801280
`int(max_features * n_features)` features are considered at each
12811281
split.
12821282
- If "auto", then `max_features=sqrt(n_features)`.
@@ -1297,23 +1297,23 @@ class ExtraTreesClassifier(ForestClassifier):
12971297
The minimum number of samples required to split an internal node:
12981298
12991299
- If int, then consider `min_samples_split` as the minimum number.
1300-
- If float, then `min_samples_split` is a percentage and
1300+
- If float, then `min_samples_split` is a fraction and
13011301
`ceil(min_samples_split * n_samples)` are the minimum
13021302
number of samples for each split.
13031303
13041304
.. versionchanged:: 0.18
1305-
Added float values for percentages.
1305+
Added float values for fractions.
13061306
13071307
min_samples_leaf : int, float, optional (default=1)
13081308
The minimum number of samples required to be at a leaf node:
13091309
13101310
- If int, then consider `min_samples_leaf` as the minimum number.
1311-
- If float, then `min_samples_leaf` is a percentage and
1311+
- If float, then `min_samples_leaf` is a fraction and
13121312
`ceil(min_samples_leaf * n_samples)` are the minimum
13131313
number of samples for each node.
13141314
13151315
.. versionchanged:: 0.18
1316-
Added float values for percentages.
1316+
Added float values for fractions.
13171317
13181318
min_weight_fraction_leaf : float, optional (default=0.)
13191319
The minimum weighted fraction of the sum total of weights (of all
@@ -1525,7 +1525,7 @@ class ExtraTreesRegressor(ForestRegressor):
15251525
The number of features to consider when looking for the best split:
15261526
15271527
- If int, then consider `max_features` features at each split.
1528-
- If float, then `max_features` is a percentage and
1528+
- If float, then `max_features` is a fraction and
15291529
`int(max_features * n_features)` features are considered at each
15301530
split.
15311531
- If "auto", then `max_features=n_features`.
@@ -1546,23 +1546,23 @@ class ExtraTreesRegressor(ForestRegressor):
15461546
The minimum number of samples required to split an internal node:
15471547
15481548
- If int, then consider `min_samples_split` as the minimum number.
1549-
- If float, then `min_samples_split` is a percentage and
1549+
- If float, then `min_samples_split` is a fraction and
15501550
`ceil(min_samples_split * n_samples)` are the minimum
15511551
number of samples for each split.
15521552
15531553
.. versionchanged:: 0.18
1554-
Added float values for percentages.
1554+
Added float values for fractions.
15551555
15561556
min_samples_leaf : int, float, optional (default=1)
15571557
The minimum number of samples required to be at a leaf node:
15581558
15591559
- If int, then consider `min_samples_leaf` as the minimum number.
1560-
- If float, then `min_samples_leaf` is a percentage and
1560+
- If float, then `min_samples_leaf` is a fraction and
15611561
`ceil(min_samples_leaf * n_samples)` are the minimum
15621562
number of samples for each node.
15631563
15641564
.. versionchanged:: 0.18
1565-
Added float values for percentages.
1565+
Added float values for fractions.
15661566
15671567
min_weight_fraction_leaf : float, optional (default=0.)
15681568
The minimum weighted fraction of the sum total of weights (of all
@@ -1736,23 +1736,23 @@ class RandomTreesEmbedding(BaseForest):
17361736
The minimum number of samples required to split an internal node:
17371737
17381738
- If int, then consider `min_samples_split` as the minimum number.
1739-
- If float, then `min_samples_split` is a percentage and
1739+
- If float, then `min_samples_split` is a fraction and
17401740
`ceil(min_samples_split * n_samples)` is the minimum
17411741
number of samples for each split.
17421742
17431743
.. versionchanged:: 0.18
1744-
Added float values for percentages.
1744+
Added float values for fractions.
17451745
17461746
min_samples_leaf : int, float, optional (default=1)
17471747
The minimum number of samples required to be at a leaf node:
17481748
17491749
- If int, then consider `min_samples_leaf` as the minimum number.
1750-
- If float, then `min_samples_leaf` is a percentage and
1750+
- If float, then `min_samples_leaf` is a fraction and
17511751
`ceil(min_samples_leaf * n_samples)` is the minimum
17521752
number of samples for each node.
17531753
17541754
.. versionchanged:: 0.18
1755-
Added float values for percentages.
1755+
Added float values for fractions.
17561756
17571757
min_weight_fraction_leaf : float, optional (default=0.)
17581758
The minimum weighted fraction of the sum total of weights (of all

sklearn/ensemble/gradient_boosting.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,23 +1330,23 @@ class GradientBoostingClassifier(BaseGradientBoosting, ClassifierMixin):
13301330
The minimum number of samples required to split an internal node:
13311331
13321332
- If int, then consider `min_samples_split` as the minimum number.
1333-
- If float, then `min_samples_split` is a percentage and
1333+
- If float, then `min_samples_split` is a fraction and
13341334
`ceil(min_samples_split * n_samples)` are the minimum
13351335
number of samples for each split.
13361336
13371337
.. versionchanged:: 0.18
1338-
Added float values for percentages.
1338+
Added float values for fractions.
13391339
13401340
min_samples_leaf : int, float, optional (default=1)
13411341
The minimum number of samples required to be at a leaf node:
13421342
13431343
- If int, then consider `min_samples_leaf` as the minimum number.
1344-
- If float, then `min_samples_leaf` is a percentage and
1344+
- If float, then `min_samples_leaf` is a fraction and
13451345
`ceil(min_samples_leaf * n_samples)` are the minimum
13461346
number of samples for each node.
13471347
13481348
.. versionchanged:: 0.18
1349-
Added float values for percentages.
1349+
Added float values for fractions.
13501350
13511351
min_weight_fraction_leaf : float, optional (default=0.)
13521352
The minimum weighted fraction of the sum total of weights (of all
@@ -1364,7 +1364,7 @@ class GradientBoostingClassifier(BaseGradientBoosting, ClassifierMixin):
13641364
The number of features to consider when looking for the best split:
13651365
13661366
- If int, then consider `max_features` features at each split.
1367-
- If float, then `max_features` is a percentage and
1367+
- If float, then `max_features` is a fraction and
13681368
`int(max_features * n_features)` features are considered at each
13691369
split.
13701370
- If "auto", then `max_features=sqrt(n_features)`.
@@ -1784,23 +1784,23 @@ class GradientBoostingRegressor(BaseGradientBoosting, RegressorMixin):
17841784
The minimum number of samples required to split an internal node:
17851785
17861786
- If int, then consider `min_samples_split` as the minimum number.
1787-
- If float, then `min_samples_split` is a percentage and
1787+
- If float, then `min_samples_split` is a fraction and
17881788
`ceil(min_samples_split * n_samples)` are the minimum
17891789
number of samples for each split.
17901790
17911791
.. versionchanged:: 0.18
1792-
Added float values for percentages.
1792+
Added float values for fractions.
17931793
17941794
min_samples_leaf : int, float, optional (default=1)
17951795
The minimum number of samples required to be at a leaf node:
17961796
17971797
- If int, then consider `min_samples_leaf` as the minimum number.
1798-
- If float, then `min_samples_leaf` is a percentage and
1798+
- If float, then `min_samples_leaf` is a fraction and
17991799
`ceil(min_samples_leaf * n_samples)` are the minimum
18001800
number of samples for each node.
18011801
18021802
.. versionchanged:: 0.18
1803-
Added float values for percentages.
1803+
Added float values for fractions.
18041804
18051805
min_weight_fraction_leaf : float, optional (default=0.)
18061806
The minimum weighted fraction of the sum total of weights (of all
@@ -1818,7 +1818,7 @@ class GradientBoostingRegressor(BaseGradientBoosting, RegressorMixin):
18181818
The number of features to consider when looking for the best split:
18191819
18201820
- If int, then consider `max_features` features at each split.
1821-
- If float, then `max_features` is a percentage and
1821+
- If float, then `max_features` is a fraction and
18221822
`int(max_features * n_features)` features are considered at each
18231823
split.
18241824
- If "auto", then `max_features=n_features`.

sklearn/tree/tree.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -540,23 +540,23 @@ class DecisionTreeClassifier(BaseDecisionTree, ClassifierMixin):
540540
The minimum number of samples required to split an internal node:
541541
542542
- If int, then consider `min_samples_split` as the minimum number.
543-
- If float, then `min_samples_split` is a percentage and
543+
- If float, then `min_samples_split` is a fraction and
544544
`ceil(min_samples_split * n_samples)` are the minimum
545545
number of samples for each split.
546546
547547
.. versionchanged:: 0.18
548-
Added float values for percentages.
548+
Added float values for fractions.
549549
550550
min_samples_leaf : int, float, optional (default=1)
551551
The minimum number of samples required to be at a leaf node:
552552
553553
- If int, then consider `min_samples_leaf` as the minimum number.
554-
- If float, then `min_samples_leaf` is a percentage and
554+
- If float, then `min_samples_leaf` is a fraction and
555555
`ceil(min_samples_leaf * n_samples)` are the minimum
556556
number of samples for each node.
557557
558558
.. versionchanged:: 0.18
559-
Added float values for percentages.
559+
Added float values for fractions.
560560
561561
min_weight_fraction_leaf : float, optional (default=0.)
562562
The minimum weighted fraction of the sum total of weights (of all
@@ -567,7 +567,7 @@ class DecisionTreeClassifier(BaseDecisionTree, ClassifierMixin):
567567
The number of features to consider when looking for the best split:
568568
569569
- If int, then consider `max_features` features at each split.
570-
- If float, then `max_features` is a percentage and
570+
- If float, then `max_features` is a fraction and
571571
`int(max_features * n_features)` features are considered at each
572572
split.
573573
- If "auto", then `max_features=sqrt(n_features)`.
@@ -905,23 +905,23 @@ class DecisionTreeRegressor(BaseDecisionTree, RegressorMixin):
905905
The minimum number of samples required to split an internal node:
906906
907907
- If int, then consider `min_samples_split` as the minimum number.
908-
- If float, then `min_samples_split` is a percentage and
908+
- If float, then `min_samples_split` is a fraction and
909909
`ceil(min_samples_split * n_samples)` are the minimum
910910
number of samples for each split.
911911
912912
.. versionchanged:: 0.18
913-
Added float values for percentages.
913+
Added float values for fractions.
914914
915915
min_samples_leaf : int, float, optional (default=1)
916916
The minimum number of samples required to be at a leaf node:
917917
918918
- If int, then consider `min_samples_leaf` as the minimum number.
919-
- If float, then `min_samples_leaf` is a percentage and
919+
- If float, then `min_samples_leaf` is a fraction and
920920
`ceil(min_samples_leaf * n_samples)` are the minimum
921921
number of samples for each node.
922922
923923
.. versionchanged:: 0.18
924-
Added float values for percentages.
924+
Added float values for fractions.
925925
926926
min_weight_fraction_leaf : float, optional (default=0.)
927927
The minimum weighted fraction of the sum total of weights (of all
@@ -932,7 +932,7 @@ class DecisionTreeRegressor(BaseDecisionTree, RegressorMixin):
932932
The number of features to consider when looking for the best split:
933933
934934
- If int, then consider `max_features` features at each split.
935-
- If float, then `max_features` is a percentage and
935+
- If float, then `max_features` is a fraction and
936936
`int(max_features * n_features)` features are considered at each
937937
split.
938938
- If "auto", then `max_features=n_features`.
@@ -1160,23 +1160,23 @@ class ExtraTreeClassifier(DecisionTreeClassifier):
11601160
The minimum number of samples required to split an internal node:
11611161
11621162
- If int, then consider `min_samples_split` as the minimum number.
1163-
- If float, then `min_samples_split` is a percentage and
1163+
- If float, then `min_samples_split` is a fraction and
11641164
`ceil(min_samples_split * n_samples)` are the minimum
11651165
number of samples for each split.
11661166
11671167
.. versionchanged:: 0.18
1168-
Added float values for percentages.
1168+
Added float values for fractions.
11691169
11701170
min_samples_leaf : int, float, optional (default=1)
11711171
The minimum number of samples required to be at a leaf node:
11721172
11731173
- If int, then consider `min_samples_leaf` as the minimum number.
1174-
- If float, then `min_samples_leaf` is a percentage and
1174+
- If float, then `min_samples_leaf` is a fraction and
11751175
`ceil(min_samples_leaf * n_samples)` are the minimum
11761176
number of samples for each node.
11771177
11781178
.. versionchanged:: 0.18
1179-
Added float values for percentages.
1179+
Added float values for fractions.
11801180
11811181
min_weight_fraction_leaf : float, optional (default=0.)
11821182
The minimum weighted fraction of the sum total of weights (of all
@@ -1187,7 +1187,7 @@ class ExtraTreeClassifier(DecisionTreeClassifier):
11871187
The number of features to consider when looking for the best split:
11881188
11891189
- If int, then consider `max_features` features at each split.
1190-
- If float, then `max_features` is a percentage and
1190+
- If float, then `max_features` is a fraction and
11911191
`int(max_features * n_features)` features are considered at each
11921192
split.
11931193
- If "auto", then `max_features=sqrt(n_features)`.
@@ -1343,23 +1343,23 @@ class ExtraTreeRegressor(DecisionTreeRegressor):
13431343
The minimum number of samples required to split an internal node:
13441344
13451345
- If int, then consider `min_samples_split` as the minimum number.
1346-
- If float, then `min_samples_split` is a percentage and
1346+
- If float, then `min_samples_split` is a fraction and
13471347
`ceil(min_samples_split * n_samples)` are the minimum
13481348
number of samples for each split.
13491349
13501350
.. versionchanged:: 0.18
1351-
Added float values for percentages.
1351+
Added float values for fractions.
13521352
13531353
min_samples_leaf : int, float, optional (default=1)
13541354
The minimum number of samples required to be at a leaf node:
13551355
13561356
- If int, then consider `min_samples_leaf` as the minimum number.
1357-
- If float, then `min_samples_leaf` is a percentage and
1357+
- If float, then `min_samples_leaf` is a fraction and
13581358
`ceil(min_samples_leaf * n_samples)` are the minimum
13591359
number of samples for each node.
13601360
13611361
.. versionchanged:: 0.18
1362-
Added float values for percentages.
1362+
Added float values for fractions.
13631363
13641364
min_weight_fraction_leaf : float, optional (default=0.)
13651365
The minimum weighted fraction of the sum total of weights (of all
@@ -1370,7 +1370,7 @@ class ExtraTreeRegressor(DecisionTreeRegressor):
13701370
The number of features to consider when looking for the best split:
13711371
13721372
- If int, then consider `max_features` features at each split.
1373-
- If float, then `max_features` is a percentage and
1373+
- If float, then `max_features` is a fraction and
13741374
`int(max_features * n_features)` features are considered at each
13751375
split.
13761376
- If "auto", then `max_features=n_features`.

0 commit comments

Comments
 (0)