Restoring balance in machine learning datasets