About tree parameter 'max_leaves'


Hi, everyone.
I recently read XGBoost’s documentation on parameters for tree boosters, and I noticed the definition on ‘max_leaves’ as being:

Maximum number of nodes to be added. Only relevant when grow_policy=lossguide is set.

I have a question about this definition: does the word “nodes” means merely leaf nodes, or both leaf nodes and internal nodes?
Apart from this, I’m also wondering if ‘max_leaves’ is functioning when ‘tree_method’ == ‘gpu_hist’ in both XGBRegressor(Classifier) and XGBRFRegressor(Classifier).


Yes, max_leaves represents the maximum number of leaf nodes. And yes, you should be able to set max_leaves for gpu_hist as well.