1. Learn
  2. /
  3. Courses
  4. /
  5. Market Basket Analysis in R

Exercise

Plot number of possible baskets

In this exercise, you will visually see how quickly the number of possible baskets grows as a function of the itemset size. This will illustrate one of the main challenges in Market Basket Analysis which is the large number of possible ways of creating a basket. You will be using here the stat_function(); this function allows you to specify within your ggplot() call which function you would like to plot by specifying the argument fun.

Instructions 1/3

undefined XP
  • 1
    • For a fixed set of 10 items, plot the number of possible baskets of size k as a function of k.
  • 2
    • Plot the number of possible baskets of size k as a function of k for a given set of 50 items.
  • 3
    • Plot the number of possible baskets of size k as a function of k for a given set of 100 items.