At the time of writing, the default XGBoost parameters are defined in the C code.
When the Python API specifies that a parameter has a None value, the default value from the C code is used.
Tree Booster Defaults
Default parameter values for the tree booster are defined in the file xgboost/src/tree/param.h.
The relevant default parameters are:
learning_rate: 0.3min_split_loss: 0max_depth: 6max_leaves: 0max_bin: 256grow_policy: “depthwise”max_cat_to_onehot: 4max_cat_threshold: 64min_child_weight: 1reg_lambda: 1reg_alpha: 0max_delta_step: 0subsample: 1sampling_method: “uniform”colsample_bynode: 1colsample_bylevel: 1colsample_bytree: 1sketch_ratio: 2cache_opt: Truerefresh_leaf: True
Parameter aliases defined in this file include:
reg_lambda,lambdareg_alpha,alphamin_split_loss,gammalearning_rate,eta
Linear Booster Defaults
Default parameter values for the linear booster are defined in the file xgboost/src/linear/param.h.
The relevant default parameters are:
learning_rate: 0.5reg_lambda: 0reg_alpha: 0feature_selector: “cyclic”
Parameter aliases defined in this file include:
reg_lambda,lambdareg_alpha,alphalearning_rate,eta
API Documentation
Default parameter values are also specified in the official API documentation.
The parameters and their defaults are as follows:
booster: gbtreedevice: cpuverbosity: 1validate_parameters: falsenthread: maximum number of threads available if not setdisable_default_eval_metric: falseeta: 0.3gamma: 0max_depth: 6min_child_weight: 1max_delta_step: 0subsample: 1sampling_method: uniformcolsample_bytree: 1colsample_bylevel: 1colsample_bynode: 1lambda: 1alpha: 0tree_method: autoscale_pos_weight: 1refresh_leaf: 1process_type: defaultgrow_policy: depthwisemax_leaves: 0max_bin: 256num_parallel_tree: 1multi_strategy: one_output_per_treemax_cached_hist_node: 65536sample_type: uniformnormalize_type: treerate_drop: 0.0one_drop: 0skip_drop: 0.0objective: reg:squarederrorseed: 0seed_per_iteration: falsetweedie_variance_power: 1.5huber_slope: 1.0lambdarank_pair_method: meanlambdarank_unbiased: falselambdarank_bias_norm: 2.0ndcg_exp_gain: truesave_period: 0task: trainmodel_dir: models/dump_format: textname_dump: dump.txtname_pred: pred.txtpred_margin: 0