How is the initial prediction F0(x) determined in gradient boosting for regression under squared error loss?

Quick Overview

Asks how gradient boosting chooses its starting prediction F0(x) for regression under squared error loss. Tests whether you can derive the loss-minimizing constant, explain its effect on the first residuals, and extend the same rule to other loss functions.

How is the initial prediction F0(x) determined in gradient boosting for regression under squared error loss?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Gradient boosting builds its model as a sum of trees added one at a time, and the sum starts from an initial prediction $F_0(x)$. How is $F_0(x)$ determined for regression under squared error loss? ```hint Start from the loss Before any tree exists, the model can only output one number for every row. Write the training loss as a function of that number and minimize it. ``` ### What a Strong Answer Covers - The general definition of $F_0$ in terms of the training loss - The derivation under squared error and the value it gives - What this starting point does to the first pseudo-residuals and to the trees fit after it - How the same rule plays out for other losses, and where common libraries set this value ### Follow-up Questions - What changes if you start from $F_0 = 0$ instead? - With sample weights, what does $F_0$ become? - For binary classification with log loss, why is the starting value the log-odds of the positive rate and not the positive rate itself? - Is the learning rate applied to $F_0$?

Overview: Asks how gradient boosting chooses its starting prediction F0(x) for regression under squared error loss. Tests whether you can derive the loss-minimizing constant, explain its effect on the first residuals, and extend the same rule to other loss functions.

PracHub logo
General
Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

Gradient boosting builds its model as a sum of trees added one at a time, and the sum starts from an initial prediction F0(x)F_0(x). How is F0(x)F_0(x) determined for regression under squared error loss?

What a Strong Answer Covers Guidance

  • The general definition of F0F_0 in terms of the training loss
  • The derivation under squared error and the value it gives
  • What this starting point does to the first pseudo-residuals and to the trees fit after it
  • How the same rule plays out for other losses, and where common libraries set this value

Follow-up Questions Guidance

  • What changes if you start from F0=0F_0 = 0 instead?
  • With sample weights, what does F0F_0 become?
  • For binary classification with log loss, why is the starting value the log-odds of the positive rate and not the positive rate itself?
  • Is the learning rate applied to F0F_0 ?