XGBoost Parameters — xgboost 3.1.0-dev documentation (original) (raw)

Before running XGBoost, we must set three types of parameters: general parameters, booster parameters and task parameters.

Note

Parameters in R package

In R-package, you can use . (dot) to replace underscore in the parameters, for example, you can use max.depth to indicate max_depth. The underscore parameters are also valid in R.

Global Configuration

The following parameters can be set in the global scope, using xgboost.config_context() (Python) or xgb.set.config() (R).

General Parameters

Parameters for Tree Booster

Parameters for Non-Exact Tree Methods

Parameters for Categorical Feature

These parameters are only used for training with categorical data. SeeCategorical Data for more information.

Note

These parameters are experimental. exact tree method is not yet supported.

Additional parameters for Dart Booster (booster=dart)

Note

Using predict() with DART booster

If the booster object is DART type, predict() will perform dropouts, i.e. only some of the trees will be evaluated. This will produce incorrect results if data is not the training data. To obtain correct results on test sets, set iteration_range to a nonzero value, e.g.

preds = bst.predict(dtest, iteration_range=(0, num_round))

Parameters for Linear Booster (booster=gblinear)

Learning Task Parameters

Specify the learning task and the corresponding learning objective. The objective options are below:

Parameters for Tweedie Regression (objective=reg:tweedie)

Parameter for using Pseudo-Huber (reg:pseudohubererror)

Parameter for using Quantile Loss (reg:quantileerror)

Parameter for using AFT Survival Loss (survival:aft) and Negative Log Likelihood of AFT metric (aft-nloglik)

Parameters for learning to rank (rank:ndcg, rank:map, rank:pairwise)

These are parameters specific to learning to rank task. See Learning to Rank for an in-depth explanation.

Specify whether do we need to debias input click data.

Command Line Parameters

The following parameters are only used in the console version of XGBoost. The CLI has been deprecated and will be removed in future releases.