เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Number of possible baskets

In market basket analysis it is important to have a good understanding of concepts related to sets, subsets and supersets. The purpose of this exercise is to get a sense of how fast the number of possible baskets, i.e. subsets, grows as a function of the itemset size, i.e. the size of the original set. Suppose you are going to a slightly larger grocery store which instead of having only 4 distinct products offers 10 different products.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Market Basket Analysis in R

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Number of items
n_items = ___

# Subset size
k = ___

# Number of possible subsets of size k
___(____,____)
แก้ไขและรันโค้ด