Machine learning algorithms implemented in Scala on Spark