BaşlayınÜcretsiz Başlayın

Changing the appearance of rules

It may happen that you do not want to calculate the confidence and lift measures for all rules, but rather some specific rules or some specific items. Adding constraints such as specifying items on the left and right hand side of the rules is of primary interest, especially if the number of items is very large. In this exercise, you will calculate the confidence and lift of rules containing the specific item HERB MARKER ROSEMARY. However, this item can either be on the left hand side of the rule or the right hand side of it.

The transactional object Online_trx is loaded in the workspace.

Bu egzersiz

Market Basket Analysis in R

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Find the confidence and lift measures
rules_rosemary_rhs = 
	apriori(Online_trx,
            parameter = list(supp=0.01, conf=0.5, minlen=2),
            appearance = list(___="___",
                              default = "___")
)

# Inspect the rules
___(___)
Kodu Düzenle ve Çalıştır