Skip to content

Commit c95f410

Browse files
authored
[doc] Mention HPO frameworks in tuning doc. (dmlc#11253)
1 parent a792cd0 commit c95f410

File tree

5 files changed

+37
-7
lines changed

5 files changed

+37
-7
lines changed

doc/faq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ This could happen, due to non-determinism in floating point summation order and
7575
Why do I see different results with sparse and dense data?
7676
**********************************************************
7777

78-
"Sparse" elements are treated as if they were "missing" by the tree booster, and as zeros by the linear booster. However, if we convert the sparse matrix back to dense matrix, the sparse matrix might fill the missing entries with 0, which is a valid value for xgboost.
78+
"Sparse" elements are treated as if they were "missing" by the tree booster, and as zeros by the linear booster. However, if we convert the sparse matrix back to dense matrix, the sparse matrix might fill the missing entries with 0, which is a valid value for xgboost. In short, sparse matrix implementations like scipy treats 0 as missing, while 0 is a valid split value for XGBoost decision trees.

doc/parameter.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,8 @@ These are parameters specific to learning to rank task. See :doc:`Learning to Ra
555555
***********************
556556
Command Line Parameters
557557
***********************
558-
The following parameters are only used in the console version of XGBoost
558+
The following parameters are only used in the console version of XGBoost. The CLI has been
559+
deprecated and will be removed in future releases.
559560

560561
* ``num_round``
561562

doc/tutorials/categorical.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Categorical Data
77
As of XGBoost 1.6, the feature is experimental and has limited features. Only the
88
Python package is fully supported.
99

10+
.. versionadded:: 3.0
11+
12+
Support for the R package using ``factor``.
13+
1014
Starting from version 1.5, the XGBoost Python package has experimental support for
1115
categorical data available for public testing. For numerical data, the split condition is
1216
defined as :math:`value < threshold`, while for categorical data the split is defined

doc/tutorials/multioutput.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ terminologies related to different multi-output models please refer to the
1313

1414
.. note::
1515

16-
As of XGBoost 2.0, the feature is experimental and has limited features. Only the
17-
Python package is tested.
16+
As of XGBoost 3.0, the feature is experimental and has limited features. Only the
17+
Python package is tested. In addition, ``glinear`` is not supported.
1818

1919
**********************************
2020
Training with One-Model-Per-Target

doc/tutorials/param_tuning.rst

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,18 @@ There are in general two ways that you can control overfitting in XGBoost:
3131

3232
* The first way is to directly control model complexity.
3333

34-
- This includes ``max_depth``, ``min_child_weight`` and ``gamma``.
34+
- This includes ``max_depth``, ``min_child_weight``, ``gamma``, ``max_cat_threshold``
35+
and other similar regularization parameters. See :doc:`/parameter` for a comprehensive
36+
set of parameters.
37+
- Set a constant ``base_score`` based on your own criteria. See
38+
:doc:`/tutorials/intercept` for more info.
3539

3640
* The second way is to add randomness to make training robust to noise.
3741

38-
- This includes ``subsample`` and ``colsample_bytree``.
39-
- You can also reduce stepsize ``eta``. Remember to increase ``num_round`` when you do so.
42+
- This includes ``subsample`` and ``colsample_bytree``, which may be used with boosting
43+
RF ``num_parallel_tree``.
44+
- You can also reduce stepsize ``eta``, possibly with a training callback. Remember to
45+
increase ``num_round`` when you do so.
4046

4147

4248
*************************
@@ -56,6 +62,25 @@ This can affect the training of XGBoost model, and there are two ways to improve
5662
- Set parameter ``max_delta_step`` to a finite number (say 1) to help convergence
5763

5864

65+
*************************************************
66+
Use Hyper Parameter Optimization (HPO) Frameworks
67+
*************************************************
68+
Tuning models is a sophisticated task and there are advanced frameworks to help you. For
69+
examples, some meta estimators in scikit-learn like
70+
:py:class:`sklearn.model_selection.HalvingGridSearchCV` can help guide the search
71+
process. Optuna is another great option and there are many more based on different
72+
branches of statistics.
73+
74+
**************
75+
Know Your Data
76+
**************
77+
It cannot be stressed enough the importance of understanding the data, sometimes that's
78+
all it takes to get a good model. Many solutions use a simple XGBoost tree model without
79+
much tuning and emphasize the data pre-processing step. XGBoost can help feature selection
80+
by providing both a global feature importance score and sample feature importance with
81+
SHAP value. Also, there are parameters specifically targeting categorical features, and
82+
tasks like survival and ranking. Feel free to explore them.
83+
5984
*********************
6085
Reducing Memory Usage
6186
*********************

0 commit comments

Comments
 (0)