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)

Model-based book recommendation system

In this section, we will show how to develop a model-based book recommendation system with the Spark MLlib library. Books and the corresponding ratings were downloaded from this link: There are three CSV files:

  • BX-Users.csv: Contains user's demographic data and each user is specified with user IDs (User-ID).

  • BX-Books.csv: Book related information such as Book-Title, Book-Author, Year-Of-Publication, and Publisher are there. Each book is identified by an ISBN. Also, Image-URL-S, Image-URL-M, and Image-URL-L are given.

  • BX-Book-Ratings.csv: Contains the rating specified by the Book-Rating column. Ratings are on a scale from 1 to 10 (higher values denoting higher appreciation), or implicit, expressed by 0.

Before we jump into the coding part, we need to know a bit more about...