Interactive Course

Market Basket Analysis in R

Explore association rules in market basket analysis with R by analyzing retail data and creating movie recommendations.

  • 4 hours
  • 16 Videos
  • 60 Exercises
  • 947 Participants
  • 4,700 XP

Loved by learners at thousands of top companies:

deloitte-grey.svg
mls-grey.svg
ebay-grey.svg
dell-grey.svg
t-mobile-grey.svg
rei-grey.svg

Course Description

Last time you were at the supermarket, what was in your shopping basket? Was there a connection between the products you purchased, like spaghetti and tomatoes or ham and pineapple? Whether online or offline, retailers use information from millions of customer’s baskets to analyze associations between items and extract insights using association rules. To help you quantify the degree of association between items you’ll use market basket analysis to uncover unseen connections and visualize relevant and insightful rules. You’ll then get to practice what you’ve learned on a movie dataset, as you predict which movies are watched together to create personalized movie recommendations for users.

  1. 1

    Introduction to Market Basket Analysis

    Free

    What’s in your basket? In this first chapter, you’ll learn how market basket analysis (MBA) can be used to look into baskets and dig into itemsets to better understand customers and predict their needs. Using tidyverse and dplyr you’ll discover how many baskets can be created from a given set of items, and learn the power of using market basket analysis for online shopping, offline shopping, and use cases beyond retail.

  2. Visualization in Market Basket Analysis

    Let’s get visual. In this chapter, you’ll visually inspect the set of rules you have previously extracted. Visualizations in market basket analysis are vital given that often you are dealing with large sets of extracted rules. You’ll use the arulesViz package to create barplots, scatterplots, and graphs to visualize your sets of inferred rules. You’ll then turn sets of plots into interactive plots, making it is easier to drill into the mined association rules.

  3. Metrics & Techniques in Market Basket Analysis

    In this chapter, you’ll convert transactional datasets to a basket format, ready for analysis using the Apriori algorithm. You’ll then be introduced to the three main metrics for market basket analysis: support, confidence, and lift, before getting hands-on with the Apriori algorithm to extract rules from a transactional dataset. Lastly, You explore how the arules package is used for market basket analysis to retrieve basket rules and to help you find the most informative and relevant rules.

  4. Case Study: Market basket with Movies

    We’re going to the movies. In this final chapter, you’ll apply everything you’ve learned as you work with a movie dataset. Using market basket analysis you’ll turn this dataset into a movie recommendation system, using information from movie transactions to understand and predict what your audience might want to watch next.

  1. 1

    Introduction to Market Basket Analysis

    Free

    What’s in your basket? In this first chapter, you’ll learn how market basket analysis (MBA) can be used to look into baskets and dig into itemsets to better understand customers and predict their needs. Using tidyverse and dplyr you’ll discover how many baskets can be created from a given set of items, and learn the power of using market basket analysis for online shopping, offline shopping, and use cases beyond retail.

  2. Metrics & Techniques in Market Basket Analysis

    In this chapter, you’ll convert transactional datasets to a basket format, ready for analysis using the Apriori algorithm. You’ll then be introduced to the three main metrics for market basket analysis: support, confidence, and lift, before getting hands-on with the Apriori algorithm to extract rules from a transactional dataset. Lastly, You explore how the arules package is used for market basket analysis to retrieve basket rules and to help you find the most informative and relevant rules.

  3. Visualization in Market Basket Analysis

    Let’s get visual. In this chapter, you’ll visually inspect the set of rules you have previously extracted. Visualizations in market basket analysis are vital given that often you are dealing with large sets of extracted rules. You’ll use the arulesViz package to create barplots, scatterplots, and graphs to visualize your sets of inferred rules. You’ll then turn sets of plots into interactive plots, making it is easier to drill into the mined association rules.

  4. Case Study: Market basket with Movies

    We’re going to the movies. In this final chapter, you’ll apply everything you’ve learned as you work with a movie dataset. Using market basket analysis you’ll turn this dataset into a movie recommendation system, using information from movie transactions to understand and predict what your audience might want to watch next.

What do other learners have to say?

Devon

“I've used other sites, but DataCamp's been the one that I've stuck with.”

Devon Edwards Joseph

Lloyd's Banking Group

Louis

“DataCamp is the top resource I recommend for learning data science.”

Louis Maiden

Harvard Business School

Ronbowers

“DataCamp is by far my favorite website to learn from.”

Ronald Bowers

Decision Science Analytics @ USAA

Christopher Bruffaerts
Christopher Bruffaerts

Statistician

Christopher is a Data Scientist with a wealth of industry experience in different sectors from banking, telecommunications, energy, and education. He's passionate about teaching, learning, and identifying the best teaching style for any given audience. In both his private and professional life, he's a data-driven person and always knows how to use it to make better decisions.

See More
Icon Icon Icon professional info