MLlib library

MLlib is a scalable machine learning library built on top of Spark. The machine learning library is composed of two distinct packages, which are [17:03]:

  1. org.apache.spark.mllib: RDD-based library of some common machine learning algorithms. This package will be deprecated in future releases.
  2. Library of machine learning algorithms that leverages datasets and data frames structures. The package supports tasks pipeline and stages that are described and illustrated in the next section.


The main components of the MLlib package are as follows:

  • Classification algorithms, including logistic regression, Naïve Bayes, and support vector machines
  • Clustering and unsupervised learning techniques such as K-means
  • L1 and L

Get Scala for Machine Learning - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.