Large-Scale Optimization For Robust Multi-Class Prediction And Resource Allocation