-1
$\begingroup$

I'm new to xgboost package and here is the doc on the parameters of this library for your reference.

My question is, logistic regression doesn't do binary splitting and build a tree unlike decision trees. If so, why max.depth and eta (learning rate) has been used in the example where the objective parameter is binary:logistic. (and the answer is accepted)

Isn't it wrong combination? or am I missing anything?

# xgboost fitting with arbitrary parameters
xgb_params_1 = list(
  objective = "binary:logistic",                                               # binary classification
  eta = 0.01,                                                                  # learning rate
  max.depth = 3,                                                               # max tree depth
  eval_metric = "auc"                                                          # evaluation/loss metric
)
$\endgroup$
2
  • $\begingroup$ I'm confused by your question. Regardless of what kind of regression you're doing, binary or otherwise, the point of XGBOOST is to combine multiple inferences from multiple trees. The loss function is logistic in your case: xgboost.readthedocs.io/en/latest/model.html $\endgroup$
    – Alex R.
    Commented May 23, 2016 at 18:51
  • $\begingroup$ @AlexR. thx, I just edited the question a bit. The point here is, logistic regression s being used in the boosting alg. So how come the tree related parameters are being passed. $\endgroup$
    – yome
    Commented May 24, 2016 at 5:14

1 Answer 1

1
$\begingroup$

Boosting to minimize binomial loss indeed does use decision trees as weak learners (though it doesn't have to, it's just the most popular choice).

Logistic regression looks like this

$$ E[y \mid x] = \text{logit} \left( \sum_j \beta_j x_j \right) $$

where $\text{logit}$ is the usual logistic transformation. For a booster the model form is

$$ E[y \mid x] = \text{logit} \left( \sum_j t_j(x) \right) $$

where each $t_j$ is a decision tree.

This model is fit by writing the binomial deviance as a function of the linear predictor instead of the predicted probability (which is replaced by a sum of decision trees in the boosting framework), and then boosting to minimize that loss function. Only at the end, when making predictions, is $\text{logit}$ reapplied to get probabilities.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.