Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Mention HPO frameworks in tuning doc. #11253

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion doc/parameter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ These are parameters specific to learning to rank task. See :doc:`Learning to Ra
***********************
Command Line Parameters
***********************
The following parameters are only used in the console version of XGBoost
The following parameters are only used in the console version of XGBoost. The CLI has been
deprecated and will be removed in future releases.

* ``num_round``

Expand Down
4 changes: 4 additions & 0 deletions doc/tutorials/categorical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Categorical Data
As of XGBoost 1.6, the feature is experimental and has limited features. Only the
Python package is fully supported.

.. versionadded:: 3.0

Support for the R package using ``factor``.

Starting from version 1.5, the XGBoost Python package has experimental support for
categorical data available for public testing. For numerical data, the split condition is
defined as :math:`value < threshold`, while for categorical data the split is defined
Expand Down
4 changes: 2 additions & 2 deletions doc/tutorials/multioutput.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ terminologies related to different multi-output models please refer to the

.. note::

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

**********************************
Training with One-Model-Per-Target
Expand Down
31 changes: 28 additions & 3 deletions doc/tutorials/param_tuning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,18 @@ There are in general two ways that you can control overfitting in XGBoost:

* The first way is to directly control model complexity.

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

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

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


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


*************************************************
Use Hyper Parameter Optimization (HPO) Frameworks
*************************************************
Tuning models is a sophisticated task and there are advanced frameworks to help you. For
examples, some meta estimators in scikit-learn like
:py:class:`sklearn.model_selection.HalvingGridSearchCV` can help guide the search
process. Optuna is another great option and there are many more based on different
branches of statistics.

**************
Know Your Data
**************
It cannot be stressed enough the importance of understanding the data, sometimes that's
all it takes to get a good model. Many solutions use a simple XGBoost tree model without
much tuning and emphasize the data pre-processing step. XGBoost can help feature selection
by providing both a global feature importance score and sample feature importance with
SHAP value. Also, there are parameters specifically targeting categorical features, and
tasks like survival and ranking. Feel free to explore them.

*********************
Reducing Memory Usage
*********************
Expand Down