Machine Learning Algorythm in R and Python