The logit function converts a probability into its log-odds: log(p/(1−p)). Unlike a probability, the resulting scale extends from negative infinity to positive infinity, making it suitable for regression-style optimization. The sigmoid function reverses this transformation and returns a value between zero and one. section 5.2.2 section 5.2.1
Use the logit to connect probability-based classification with regression and model optimization:
- Transform binary-class probabilities into an unbounded target for regression-style learning. section 5.2.2
- Support logistic regression, where the link function connects the linear model with probabilities and Bernoulli optimization. section 4.3.3
- Represent gradient boosting corrections on the logit of class probability before applying the sigmoid. section 5.2.1
Implementing logits in gradient boosting
A NumPy implementation clips probabilities away from zero and one before calculating log(x/(1−x)). It initializes the model with the logit of the mean target, then uses the sigmoid to produce bounded predictions. This lets gradient boosting fit regression trees while returning classification probabilities. section 5.2.2
















