Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Machine Learning with Scala Quick Start Guide

You're reading from   Machine Learning with Scala Quick Start Guide Leverage popular machine learning algorithms and techniques and implement them in Scala

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781789345070
Length 220 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Md. Rezaul Karim Md. Rezaul Karim
Author Profile Icon Md. Rezaul Karim
Md. Rezaul Karim
Ajay Kumar N Ajay Kumar N
Author Profile Icon Ajay Kumar N
Ajay Kumar N
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Introduction to Machine Learning with Scala 2. Scala for Regression Analysis FREE CHAPTER 3. Scala for Learning Classification 4. Scala for Tree-Based Ensemble Techniques 5. Scala for Dimensionality Reduction and Clustering 6. Scala for Recommender System 7. Introduction to Deep Learning with Scala 8. Other Books You May Enjoy

Generalized linear regression (GLR)

In an LR, the output is assumed to follow a Gaussian distribution. In contrast, in generalized linear models (GLMs), the response variable Yi follows some random distribution from a parametric set of probability distributions of a certain form. As we have seen in the previous example, following and creating a GLR estimator will not be difficult:

val glr = new GeneralizedLinearRegression()
.setFamily("gaussian")//continuous value prediction (or gamma)
.setLink("identity")//continuous value prediction (or inverse)
.setFeaturesCol("features")
.setLabelCol("label")

For the GLR-based prediction, the following response and identity link functions are supported based on data types (source: https://spark.apache.org/docs/latest/ml-classification-regression.html#generalized-linear-regression...

You have been reading a chapter from
Machine Learning with Scala Quick Start Guide
Published in: Apr 2019
Publisher: Packt
ISBN-13: 9781789345070
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime