Gradient boosting for binary classification uses the log loss with as the log-odds. The data are with labels . Start from the best constant, grow a stump that splits between and , and use Newton leaf values with learning rate . What are the new probabilities?
Supervised learning, Gradient boosting for classification
Level L3 Intermediate. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can carry out one round of boosting with a non-squared loss, using residual and the Newton leaf value .
Key idea
For log loss with , the negative gradient is and the second derivative is . The leaf value is .
Steps
- Initial constant. Two of five labels are positive, so and . Every point starts with .
- Residuals : . These are the negative gradients of the log loss with respect to . The weights for every point.
- The stump has two leaves. Left leaf : the sum of residuals is and the sum of weights is , so .
- Right leaf : the sum of residuals is and the sum of weights is , so .
- Update with learning rate . Left: . Right: .
- Convert with the sigmoid: left ; right . The positives move from to and the negatives from to .
- Check the direction: the log loss falls. The model is now confident and correct in both leaves. The next round fits the new residuals (now ).
Common mistakes
- Using the mean residual as the leaf value, as in squared-loss boosting. For log loss that value is not the Newton step and can be too large or too small.
- Adding the leaf value to the probability instead of to the log-odds , which can push probabilities outside .
- Forgetting the learning rate , or applying it to the residuals instead of to the leaf values.
How long your answer should be
One page with a small table; 7 minutes.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: The pinball (quantile) loss for level is if and if , with . Show that the constant minimising is the -quantile of . How do you check it numerically for on ?
Next in Supervised learning: A hard-margin linear SVM is trained on with label and on , and with label . Find , , the margin and the dual variables . Which points are support vectors?