In this recipe, we explore Spark's 2.0 multilayer perceptron classifier (MLPC), which is another name for feed-forward neural networks. We use the iris data set to predict a binary outcome for the feature vectors that describes the input. The key point to remember is that, even though the name sounds a bit complicated, at its core the MLP is just a non-linear classifier for data that cannot be separated via a simple linear line or hyperplane.
- Go to the
LIBSVM
Data: Classification (Multi-class) Repository and download the file from the following URL: https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/iris.scale
- Start a new project in IntelliJ or in an IDE of your choice. Make sure the necessary JAR files are included.
- Set up the package location where the program will reside:
package spark.ml.cookbook.chapter5
- Import the necessary packages for
SparkSession
to gain access to the cluster andLog4j.Logger
to reduce...