NumPy allowed · plain Python earns 10 bonus points
θ ← θ − 0.14 · ∂L/∂θ
Compute negative gradient pseudo-residuals for regression and binary classification gradient boosting.
Implement gbm_pseudo_residuals(y_true, raw_predictions, loss_type): for 'regression' (squared error), residual is y - raw. For 'classification' (binary log loss with y in {0, 1}), residual is y - sigmoid(raw). Return list of residuals rounded to 4 decimal places.
gbm_pseudo_residuals(y_true: list[float], raw_predictions: list[float], loss_type: str) -> list[float]