Loading...
Implement one step of the AdaBoost weight update algorithm.
Given sample weights w, predictions y^, and true labels y:
Labels are {−1,+1}. Return a tuple (alpha, new_weights) with alpha and each weight rounded to 4 decimal places.
weights = [0.25, 0.25, 0.25, 0.25] y_true = [1, -1, 1, -1] y_pred = [1, -1, -1, -1]
(0.5493, [0.1667, 0.1667, 0.5, 0.1667])