Structured Prediction by Conditional Risk Minimization