Machine Learning algorithm from class assignments