basic machine learning algorithms for Scala