You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/parameter.rst
+6-8
Original file line number
Diff line number
Diff line change
@@ -74,8 +74,8 @@ Parameters for Tree Booster
74
74
75
75
* ``max_depth`` [default=6]
76
76
77
-
- Maximum depth of a tree. Increasing this value will make the model more complex and more likely to overfit. 0 is only accepted in ``lossguide`` growing policy when ``tree_method`` is set as ``hist`` or ``gpu_hist`` and it indicates no limit on depth. Beware that XGBoost aggressively consumes memory when training a deep tree.
78
-
- range: [0,∞] (0 is only accepted in ``lossguide`` growing policy when ``tree_method`` is set as ``hist`` or ``gpu_hist``)
77
+
- Maximum depth of a tree. Increasing this value will make the model more complex and more likely to overfit. 0 indicates no limit on depth. Beware that XGBoost aggressively consumes memory when training a deep tree. ``exact`` tree method requires non-zero value.
78
+
- range: [0,∞]
79
79
80
80
* ``min_child_weight`` [default=1]
81
81
@@ -164,7 +164,7 @@ Parameters for Tree Booster
164
164
165
165
- Control the balance of positive and negative weights, useful for unbalanced classes. A typical value to consider: ``sum(negative instances) / sum(positive instances)``. See :doc:`Parameters Tuning </tutorials/param_tuning>` for more discussion. Also, see Higgs Kaggle competition demo for examples: `R <https://github.com/dmlc/xgboost/blob/master/demo/kaggle-higgs/higgs-train.R>`_, `py1 <https://github.com/dmlc/xgboost/blob/master/demo/kaggle-higgs/higgs-numpy.py>`_, `py2 <https://github.com/dmlc/xgboost/blob/master/demo/kaggle-higgs/higgs-cv.py>`_, `py3 <https://github.com/dmlc/xgboost/blob/master/demo/guide-python/cross_validation.py>`_.
166
166
167
-
* ``updater`` [default= ``grow_colmaker,prune``]
167
+
* ``updater``
168
168
169
169
- A comma separated string defining the sequence of tree updaters to run, providing a modular way to construct and to modify the trees. This is an advanced parameter that is usually set automatically, depending on some other parameters. However, it could be also set explicitly by a user. The following updaters exist:
170
170
@@ -177,8 +177,6 @@ Parameters for Tree Booster
177
177
- ``refresh``: refreshes tree's statistics and/or leaf values based on the current data. Note that no random subsampling of data rows is performed.
178
178
- ``prune``: prunes the splits where loss < min_split_loss (or gamma) and nodes that have depth greater than ``max_depth``.
179
179
180
-
- In a distributed setting, the implicit updater sequence value would be adjusted to ``grow_histmaker,prune`` by default, and you can set ``tree_method`` as ``hist`` to use ``grow_histmaker``.
181
-
182
180
* ``refresh_leaf`` [default=1]
183
181
184
182
- This is a parameter of the ``refresh`` updater. When this flag is 1, tree leafs as well as tree nodes' stats are updated. When it is 0, only node stats are updated.
@@ -194,19 +192,19 @@ Parameters for Tree Booster
194
192
* ``grow_policy`` [default= ``depthwise``]
195
193
196
194
- Controls a way new nodes are added to the tree.
197
-
- Currently supported only if ``tree_method`` is set to ``hist`` or ``gpu_hist``.
195
+
- Currently supported only if ``tree_method`` is set to ``hist``, ``approx`` or ``gpu_hist``.
198
196
- Choices: ``depthwise``, ``lossguide``
199
197
200
198
- ``depthwise``: split at nodes closest to the root.
201
199
- ``lossguide``: split at nodes with highest loss change.
202
200
203
201
* ``max_leaves`` [default=0]
204
202
205
-
- Maximum number of nodes to be added. Only relevant when ``grow_policy=lossguide`` is set.
203
+
- Maximum number of nodes to be added. Not used by ``exact`` tree method.
206
204
207
205
* ``max_bin``, [default=256]
208
206
209
-
- Only used if ``tree_method`` is set to ``hist`` or ``gpu_hist``.
207
+
- Only used if ``tree_method`` is set to ``hist``, ``approx`` or ``gpu_hist``.
210
208
- Maximum number of discrete bins to bucket continuous features.
211
209
- Increasing this number improves the optimality of splits at the cost of higher computation time.
Copy file name to clipboardExpand all lines: doc/tutorials/monotonic.rst
+12-15
Original file line number
Diff line number
Diff line change
@@ -2,23 +2,23 @@
2
2
Monotonic Constraints
3
3
#####################
4
4
5
-
It is often the case in a modeling problem or project that the functional form of an acceptable model is constrained in some way. This may happen due to business considerations, or because of the type of scientific question being investigated. In some cases, where there is a very strong prior belief that the true relationship has some quality, constraints can be used to improve the predictive performance of the model.
5
+
It is often the case in a modeling problem or project that the functional form of an acceptable model is constrained in some way. This may happen due to business considerations, or because of the type of scientific question being investigated. In some cases, where there is a very strong prior belief that the true relationship has some quality, constraints can be used to improve the predictive performance of the model.
6
6
7
7
A common type of constraint in this situation is that certain features bear a **monotonic** relationship to the predicted response:
In this example the training data ``X`` has two columns, and by using the parameter values ``(1,-1)`` we are telling XGBoost to impose an increasing constraint on the first predictor and a decreasing constraint on the second.
@@ -82,14 +82,11 @@ Some other examples:
82
82
- ``(1,0)``: An increasing constraint on the first predictor and no constraint on the second.
83
83
- ``(0,-1)``: No constraint on the first predictor and a decreasing constraint on the second.
84
84
85
-
**Choice of tree construction algorithm**. To use monotonic constraints, be
86
-
sure to set the ``tree_method`` parameter to one of ``exact``, ``hist``, and
87
-
``gpu_hist``.
88
85
89
86
**Note for the 'hist' tree construction algorithm**.
90
-
If ``tree_method`` is set to either ``hist``or ``gpu_hist``, enabling monotonic
91
-
constraints may produce unnecessarily shallow trees. This is because the
87
+
If ``tree_method`` is set to either ``hist``, ``approx`` or ``gpu_hist``, enabling
88
+
monotonic constraints may produce unnecessarily shallow trees. This is because the
92
89
``hist`` method reduces the number of candidate splits to be considered at each
93
-
split. Monotonic constraints may wipe out all available split candidates, in
94
-
which case no split is made. To reduce the effect, you may want to increase
95
-
the ``max_bin`` parameter to consider more split candidates.
90
+
split. Monotonic constraints may wipe out all available split candidates, in which case no
91
+
split is made. To reduce the effect, you may want to increase the ``max_bin`` parameter to
0 commit comments