Gradient Boosting: fit one tree to the negative gradient of the loss
Intermediate classical-mlensemblesgradient-boosting
Implement:
def negative_gradient(targets: np.ndarray, predictions: np.ndarray) -> np.ndarray: ...
def fit_tree_to_negative_gradient(
input: np.ndarray, targets: np.ndarray, predictions: np.ndarray, max_depth: int
) -> dict: ...
- Reuse
05-regression-trees's build_regression_tree, don't reimplement it.
- This uses squared-error loss throughout:
L = 0.5 * (target - prediction)^2.