I went through the explanation here ( http://blog.kaggle.com/2017/01/23/a-kaggle-master-explains-gradient-boosting/), but don't understand why the new trees in gradient boosting try to predict he gradient of loss function instead of actual residual ( y-y^). And is my understanding right that the first tree uses (as its prediction) a simple constant value to approximate true values , like a median for all the y.
Also, another question is how does it work for classification.
Can anyone please explain the statement made below, in detail if possible, in here Understanding gradient boosting
"In general, gradient boosting, when used for classification, fits trees not on the level of the gradient of predicted probabilities, but to the gradient of the predicted log-odds."