Skip to content

Commit 853e3d5

Browse files
authored
[doc] Mention the integer type for some parameters. (dmlc#11266)
Python type annotation is not changed. We can use np.int32, but it's just one implementation of int32, there are others.
1 parent c95f410 commit 853e3d5

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

R-package/R/xgb.train.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ xgb.train <- function(params = xgb.params(), data, nrounds, evals = list(),
486486
#' range: \eqn{[0, \infty)}
487487
#'
488488
#' Note: should only pass one of `gamma` or `min_split_loss`. Both refer to the same parameter and there's thus no difference between one or the other.
489-
#' @param max_depth (for Tree Booster) (default=6)
489+
#' @param max_depth (for Tree Booster) (default=6, type=int32)
490490
#' 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.
491491
#'
492492
#' range: \eqn{[0, \infty)}
@@ -579,9 +579,9 @@ xgb.train <- function(params = xgb.params(), data, nrounds, evals = list(),
579579
#' - Choices: `"depthwise"`, `"lossguide"`
580580
#' - `"depthwise"`: split at nodes closest to the root.
581581
#' - `"lossguide"`: split at nodes with highest loss change.
582-
#' @param max_leaves (for Tree Booster) (default=0)
582+
#' @param max_leaves (for Tree Booster) (default=0, type=int32)
583583
#' Maximum number of nodes to be added. Not used by `"exact"` tree method.
584-
#' @param max_bin (for Tree Booster) (default=256)
584+
#' @param max_bin (for Tree Booster) (default=256, type=int32)
585585
#' - Only used if `tree_method` is set to `"hist"` or `"approx"`.
586586
#' - Maximum number of discrete bins to bucket continuous features.
587587
#' - Increasing this number improves the optimality of splits at the cost of higher computation time.

R-package/man/xgb.params.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

R-package/man/xgboost.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/parameter.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The following parameters can be set in the global scope, using :py:func:`xgboost
3939
******************
4040
General Parameters
4141
******************
42-
* ``booster`` [default= ``gbtree`` ]
42+
* ``booster`` [default= ``gbtree``]
4343

4444
- Which booster to use. Can be ``gbtree``, ``gblinear`` or ``dart``; ``gbtree`` and ``dart`` use tree based models while ``gblinear`` uses linear functions.
4545

@@ -90,7 +90,7 @@ Parameters for Tree Booster
9090
- Minimum loss reduction required to make a further partition on a leaf node of the tree. The larger ``gamma`` is, the more conservative the algorithm will be. Note that a tree where no splits were made might still contain a single terminal node with a non-zero score.
9191
- range: [0,∞]
9292

93-
* ``max_depth`` [default=6]
93+
* ``max_depth`` [default=6, type=int32]
9494

9595
- 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.
9696
- range: [0,∞]
@@ -198,11 +198,11 @@ Parameters for Tree Booster
198198
- ``depthwise``: split at nodes closest to the root.
199199
- ``lossguide``: split at nodes with highest loss change.
200200

201-
* ``max_leaves`` [default=0]
201+
* ``max_leaves`` [default=0, type=int32]
202202

203203
- Maximum number of nodes to be added. Not used by ``exact`` tree method.
204204

205-
* ``max_bin``, [default=256]
205+
* ``max_bin``, [default=256, type=int32]
206206

207207
- Only used if ``tree_method`` is set to ``hist`` or ``approx``.
208208
- Maximum number of discrete bins to bucket continuous features.

0 commit comments

Comments
 (0)