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

Popularity of movies

In the last lesson, you explored the transactional dataset of movies. In this exercise, you will figure out the popularity of movies watched from the same dataset. So, aren't you curious to figure out the list of items that are the most popular in the transactional dataset movie_trx?

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

Market Basket Analysis in R

ดูคอร์ส

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

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

# Extract the set of most frequent itemsets
itemsets = apriori(movie_trx,
                    ___ = list(support = ___,
                               target = '___'
                    ))

# Inspect the five most popular items
inspect(___(itemsets, by='___', decreasing = T)[1:5])
แก้ไขและรันโค้ด