Building a Recommendation System with R

Book description

Learn the art of building robust and powerful recommendation engines using R

About This Book

  • Learn to exploit various data mining techniques
  • Understand some of the most popular recommendation techniques
  • This is a step-by-step guide full of real-world examples to help you build and optimize recommendation engines

Who This Book Is For

If you are a competent developer with some knowledge of machine learning and R, and want to further enhance your skills to build recommendation systems, then this book is for you.

What You Will Learn

  • Get to grips with the most important branches of recommendation
  • Understand various data processing and data mining techniques
  • Evaluate and optimize the recommendation algorithms
  • Prepare and structure the data before building models
  • Discover different recommender systems along with their implementation in R
  • Explore various evaluation techniques used in recommender systems
  • Get to know about recommenderlab, an R package, and understand how to optimize it to build efficient recommendation systems

In Detail

A recommendation system performs extensive data analysis in order to generate suggestions to its users about what might interest them. R has recently become one of the most popular programming languages for the data analysis. Its structure allows you to interactively explore the data and its modules contain the most cutting-edge techniques thanks to its wide international community. This distinctive feature of the R language makes it a preferred choice for developers who are looking to build recommendation systems.

The book will help you understand how to build recommender systems using R. It starts off by explaining the basics of data mining and machine learning. Next, you will be familiarized with how to build and optimize recommender models using R. Following that, you will be given an overview of the most popular recommendation techniques. Finally, you will learn to implement all the concepts you have learned throughout the book to build a recommender system.

Style and approach

This is a step-by-step guide that will take you through a series of core tasks. Every task is explained in detail with the help of practical examples.

Publisher resources

Download Example Code

Table of contents

  1. Building a Recommendation System with R
    1. Table of Contents
    2. Building a Recommendation System with R
    3. Credits
    4. About the Authors
    5. About the Reviewer
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Citation
      5. Conventions
      6. Reader feedback
      7. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Getting Started with Recommender Systems
      1. Understanding recommender systems
      2. The structure of the book
      3. Collaborative filtering recommender systems
      4. Content-based recommender systems
      5. Knowledge-based recommender systems
      6. Hybrid systems
      7. Evaluation techniques
      8. A case study
      9. The future scope
      10. Summary
    9. 2. Data Mining Techniques Used in Recommender Systems
      1. Solving a data analysis problem
      2. Data preprocessing techniques
        1. Similarity measures
          1. Euclidian distance
          2. Cosine distance
          3. Pearson correlation
        2. Dimensionality reduction
          1. Principal component analysis
      3. Data mining techniques
      4. Cluster analysis
        1. Explaining the k-means cluster algorithm
          1. Support vector machine
      5. Decision trees
      6. Ensemble methods
        1. Bagging
        2. Random forests
        3. Boosting
      7. Evaluating data-mining algorithms
      8. Summary
    10. 3. Recommender Systems
      1. R package for recommendation – recommenderlab
        1. Datasets
          1. Jester5k, MSWeb, and MovieLense
        2. The class for rating matrices
        3. Computing the similarity matrix
        4. Recommendation models
      2. Data exploration
        1. Exploring the nature of the data
        2. Exploring the values of the rating
        3. Exploring which movies have been viewed
        4. Exploring the average ratings
        5. Visualizing the matrix
      3. Data preparation
        1. Selecting the most relevant data
        2. Exploring the most relevant data
        3. Normalizing the data
        4. Binarizing the data
      4. Item-based collaborative filtering
        1. Defining the training and test sets
        2. Building the recommendation model
        3. Exploring the recommender model
        4. Applying the recommender model on the test set
      5. User-based collaborative filtering
        1. Building the recommendation model
        2. Applying the recommender model on the test set
        3. Collaborative filtering on binary data
        4. Data preparation
        5. Item-based collaborative filtering on binary data
      6. User-based collaborative filtering on binary data
        1. Conclusions about collaborative filtering
          1. Limitations of collaborative filtering
      7. Content-based filtering
      8. Hybrid recommender systems
      9. Knowledge-based recommender systems
      10. Summary
    11. 4. Evaluating the Recommender Systems
      1. Preparing the data to evaluate the models
        1. Splitting the data
        2. Bootstrapping data
        3. Using k-fold to validate models
      2. Evaluating recommender techniques
        1. Evaluating the ratings
        2. Evaluating the recommendations
      3. Identifying the most suitable model
        1. Comparing models
        2. Identifying the most suitable model
        3. Optimizing a numeric parameter
      4. Summary
    12. 5. Case Study – Building Your Own Recommendation Engine
      1. Preparing the data
        1. Description of the data
        2. Importing the data
        3. Defining a rating matrix
        4. Extracting item attributes
      2. Building the model
      3. Evaluating and optimizing the model
        1. Building a function to evaluate the model
        2. Optimizing the model parameters
      4. Summary
    13. A. References
    14. Index

Product information

  • Title: Building a Recommendation System with R
  • Author(s): Suresh K. Gorakala
  • Release date: September 2015
  • Publisher(s): Packt Publishing
  • ISBN: 9781783554492