test code for machine learning