Book Image

Modern Scala Projects

By : Ilango gurusamy
Book Image

Modern Scala Projects

By: Ilango gurusamy

Overview of this book

Scala is both a functional programming and object-oriented programming language designed to express common programming patterns in a concise, readable, and type-safe way. Complete with step-by-step instructions, Modern Scala Projects will guide you in exploring Scala capabilities and learning best practices. Along the way, you'll build applications for professional contexts while understanding the core tasks and components. You’ll begin with a project for predicting the class of a flower by implementing a simple machine learning model. Next, you'll create a cancer diagnosis classification pipeline, followed by tackling projects delving into stock price prediction, spam filtering, fraud detection, and a recommendation engine. The focus will be on application of ML techniques that classify data and make predictions, with an emphasis on automating data workflows with the Spark ML pipeline API. The book also showcases the best of Scala’s functional libraries and other constructs to help you roll out your own scalable data processing frameworks. By the end of this Scala book, you’ll have a firm foundation in Scala programming and have built some interesting real-world projects to add to your portfolio.
Table of Contents (14 chapters)
Title Page
Copyright and Credits
Packt Upsell
Contributors
Preface
Index

Chapter 7. Building a Recommendation Engine

Millions of people order items from Amazon, where they save money and time. Recommendation algorithms are learned from customers, ordering preferences and bring them tailored you may also like recommendations, which are suggestions that help the customer update their cart or add interesting items to a wishlist for later. 

Building our own recommendations engine is a learning journey, where we hit several objectives along the way. At the problem formulation stage, we learn that recommendations are a collaborative filtering machine learning problem. We will take advantage of the Spark ML collaborative filtering algorithm to implement a recommendations engine that will generate ratings-based recommendations.

Netflix is famous for its movies where you might enjoy the recommendation feature. Back in 2006, Netflix announced a prize of $1 million for the best enhancement over their aging CineMatch movie recommendation algorithm. This trendsetting competition...