implementing machine learning