machine learning algorithm programming by R