# Number of model DoF in XGBoost regressor?

I'm using XGBoost (python) to solve a regression problem. I instantiate the model like so:

import xgboost
mod = xgboost.XGBRFRegressor()


I would like to extract the number of model degrees of freedom from this, in order to compare performance with simpler models. I am aware that there are alternate approaches, such as cross validation, but I'm curious as to whether an xgboost model has a clearly defined DoF, and if that's possible to obtain. I've looked at the docs but cannot find any mention of model DoF.

Degrees of freedom are not well-defined for regression trees. This is even more pronounces in the case of gradient boosters where we use potentially hunderds of trees. Adding in the fact that we also regularise our fitting procedures both within a tree and across trees makes the whole concept even muddier. (So we cannot even see it is something like num_of_trees times mean_num_of_nodes_per_tree.)