Cross-validating a machine learning model