Loading...
Implement bagging aggregation for an ensemble of model predictions.
Given predictions from m models for n data points:
In case of a tie in majority voting, return the smallest class label.
Return a list of aggregated predictions, rounded to 4 decimal places for regression.
predictions = [[1, 0, 1], [0, 0, 1], [1, 1, 1]] mode = "classify"
[1, 0, 1]
predictions is a 2D list where each row represents a model's predictions and each column represents a data point.