Bagging with Adaptive Costs