This chapter kicks off a machine learning (ML) initiative in Scala and Spark. Speaking of Spark, its Machine Learning Library (MLlib) living under the spark.ml package and accessible via its MLlib DataFrame-based API will help us develop scalable data analysis applications. The MLlib DataFrame-based API, also known as Spark ML, provides powerful learning algorithms and pipeline building tools for data analysis. Needless to say, we will, starting this chapter, leverage MLlib's classification algorithms.
The Spark ecosystem, also boasting of APIs to R, Python, and Java in addition to Scala, empowers our readers, be they beginner, or seasoned data professionals, to make sense of and extract analytics from various datasets.
Speaking of datasets, the Iris dataset is the simplest, yet the most famous data analysis task in the ML space. This chapter builds a solution to the data analysis classification task that the Iris dataset represents.
Here is the dataset we will refer to:
- UCI Machine Learning Repository: Iris Data Set
- Accessed July 13, 2018
- Website URL: https://archive.ics.uci.edu/ml/datasets/Iris
The overarching learning objective of this chapter is to implement a Scala solution to the so-called multivariate classification task represented by the Iris dataset.
The following list is a section-wise breakdown of individual learning outcomes:
- A multivariate classification problem
- Project overview—problem formulation
- Getting started with Spark
- Implementing a multiclass classification pipeline
The following section offers the reader an in-depth perspective on the Iris dataset classification problem.