Adaptive Optimization for Cross Validation