Book Image

Machine Learning with Scala Quick Start Guide

By : Md. Rezaul Karim, Ajay Kumar N
Book Image

Machine Learning with Scala Quick Start Guide

By: Md. Rezaul Karim, Ajay Kumar N

Overview of this book

Scala is a highly scalable integration of object-oriented nature and functional programming concepts that make it easy to build scalable and complex big data applications. This book is a handy guide for machine learning developers and data scientists who want to develop and train effective machine learning models in Scala. The book starts with an introduction to machine learning, while covering deep learning and machine learning basics. It then explains how to use Scala-based ML libraries to solve classification and regression problems using linear regression, generalized linear regression, logistic regression, support vector machine, and Naïve Bayes algorithms. It also covers tree-based ensemble techniques for solving both classification and regression problems. Moving ahead, it covers unsupervised learning techniques, such as dimensionality reduction, clustering, and recommender systems. Finally, it provides a brief overview of deep learning using a real-life example in Scala.
Table of Contents (9 chapters)

What this book covers

Chapter 1, Introduction to Machine Learning with Scala, first explains some basic concepts of machine learning and different learning tasks. It then discusses Scala-based machine learning libraries, which is followed by configuring your programming environment. Finally, it covers Apache Spark briefly, before demonstrating a step-by-step example.

Chapter 2, Scala for Regression Analysis, covers a supervised learning task called regression analysis with examples, followed by regression metrics. It then explains some regression analysis algorithms, including linear regression and generalized linear regression. Finally, it demonstrates a step-by-step solution to a regression analysis task using Spark ML in Scala.

Chapter 3, Scala for Learning Classification, briefly explains another supervised learning task called classification with examples, followed by explaining how to interpret performance evaluation metrics. It then covers widely used classification algorithms such as logistic regression, Naïve Bayes, and support vector machines (SVMs). Finally, it demonstrates a step-by-step solution to a classification problem using Spark ML in Scala.

Chapter 4, Scala for Tree-Based Ensemble Techniques, covers very powerful and widely used tree-based approaches, including decision trees, gradient-boosted trees, and random forest algorithms, for both classification and regression analysis. It then revisits the examples of Chapter 2, Scala for Regression Analysis, and Chapter 3, Scala for Learning Classification, before solving them using these tree-based algorithms.

Chapter 5, Scala for Dimensionality Reduction and Clustering, briefly discusses different clustering analysis algorithms, followed by a step-by-step example of solving a clustering problem. Finally, it discusses the curse of dimensionality in high-dimensional data, before showing an example of solving it using principal component analysis (PCA).

Chapter 6, Scala for Recommender System, briefly covers similarity-based, content-based, and collaborative filtering approaches for developing recommendation systems. Finally, it demonstrates an example of a book recommender system with Spark ML in Scala.

Chapter 7, Introduction to Deep Learning with Scala, briefly covers deep learning, artificial neural networks, and neural network architectures. It then discusses some available deep learning frameworks. Finally, it demonstrates a step-by-step example of solving a cancer type prediction problem using a long short-term memory (LSTM) network.