1

I am trying to understand the XGBoost algorithm and have a few questions around it.

I have read various blogs but all seem to tell a different story. Below is a snippet from the code that I am using (only for reference).

param <- list(  objective           =  'reg:linear',
                eta                 = 0.01,
                max_depth           = 7,
                subsample           = 0.7,
                colsample_bytree    = 0.7,
                min_child_weight    =  5
)

Below are the 4 questions that I have:

1) It seems that XGBoost uses Gradient decent to minimise the cost function by changing the coefficients. I understand that it can be done for a gblinear model which uses linear regression.

However, for a gbtree model, how can XGboost apply gradient decent as there are no coefficients in the tree based model for the model to change. Or are there?

2) Similarly, gbtree model uses parameters lambda for L2 regularisation and alpha for L1 regularisation. I understand that regularisation applies some constraints on coefficients, but again a gbtree model has no coefficients. So how can it apply constraints on it?

3) What is the job of an objective function. For e.g. reg:linear. From what I understand, assigning an objective function only tells the model which evaluation metric to use. But then, there is a separate eval_metric parameter for it. So why do we need objective function?

4) What is min_child_weight in simple terms? I thought it is just the minimum no. of observations in the leaf node. But I think it has something to do with hessian metrics etc, which I don't understand well.

Hence, I would really appreciate if anyone can through some more light on these in simple and easy to understand terms?

Prince
  • 69
  • 5

0 Answers0