There's more...

Elastic net (contributed by DB Tsai and others) and evangelized by Alpine Labs showed up in our radar starting with Spark 1.4 and 1.5, which is now the de facto technique in Spark 2.0.

To level set, elastic net is a linear combination of L1 and L2 penalty. It can be modeled conceptually as a dial that can decide how much of L1 and how much of L2 to include in the penalty (Shrinkage versus Selection).

We want to stress that we can now select between the type of regression via the parameter setting rather than named APIs. This is an important departure from RDD-based APIs (that is, now in maintenance mode) that we demonstrate later in this chapter.

The following table provides a quick cheat sheet for setting parameters to select ...

Get Apache Spark 2.x Machine Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.