cleaned up sanity checks for machine learning