MulaiMulai sekarang secara gratis

The support measure

In the last exercise, you dug into the several transactions of the Online_trx dataset. Now it's time for you to figure out the support metrics of a few specific items.

Previously, you already found the number of transactions containing the HERB MARKER ROSEMARY item. In this exercise, you will find the support of that same product alongside the HERB MARKER THYME item at different support thresholds using the apriori() function of the arules package.

The transactional object Online_trx is loaded in the workspace.

Latihan ini adalah bagian dari kursus

Market Basket Analysis in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Determine the support of both items with support 0.1
support_rosemary_thyme = 
	apriori(Online_trx,
            parameter = list(target = "___",
                             supp = 0.1),
            ___ = list(___ = 
                              c("HERB MARKER ROSEMARY",
                                "HERB MARKER THYME"))
)

# Summary of the object 
___(___)
Edit dan Jalankan Kode