Training, validation and testing for supervised machine learning models