Generalized linear regression in Spark 2.0

This recipe covers the generalized regression model (GLM) implementation in Spark 2.0. There is a great parallel between this GeneralizedLinearRegression in Spark 2.0 and glmnet implementation in R. This API is a welcome addition that allows you to select and set both distribution family (for example, Gaussian) and link functions (for example, inverse log) with a coherent and well-designed API.

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.