Solution to PredictionAssignment