Lab 11 - Association Learning


Objectives

  1. Association Learning: Apriori algorithm


The Dataset

Here is a table with contact lenses related data....

AGE
SPECTACLE-PRESCR
ASTIGMATISM
TEAR-PRODUCT-RATE
CONTACT-LENSES
young
myope
no
reduced
none
young
myope
no
normal
soft
young
myope
yes
reduced
none
young
myope
yes
reduced
hard
young
hypermetrope
no
reduced
none
young
hypermetrope
no
normal
soft
young
hypermetrope
yes
reduced
none
young
hypermetrope
yes
normal
hard
pre-presbyopic
myope
no
reduced
none
pre-presbyopic
myope
no
normal
soft
pre-presbyopic
myope
yes
reduced
none
pre-presbyopic
myope
yes
normal
hard
pre-presbyopic
hypermetrope
no
reduced
none
pre-presbyopic
hypermetrope
no
normal
soft
pre-presbyopic
hypermetrope
yes
reduced
none
pre-presbyopic
hypermetrope
yes
normal
none
presbyopic
myope
no
reduced
none
presbyopic
myope
no
normal
none
presbyopic
myope
yes
reduced
none
presbyopic
myope
yes
normal
hard
presbyopic
hypermetrope
no
reduced
none
presbyopic
hypermetrope
no
normal
soft
presbyopic
hypermetrope
yes
normal
none
presbyopic
hypermetrope
yes
normal
none


Association Learning

Now, lets use the training data above to compute support and confidence values for the following association rule:

			if    spectacle-prescr=myope and astigmatism = no 
      			then  tear-prod-rate = reduced 

The following are some of the two-item sets that would be generated by the Apriori algorithm from the training data if it uses a minimum support value of 4:

      spectacle-prescr=myope			astigmatism = yes
      spectacle-prescr=myope		        astigmatism = no 
      spectacle-prescr=myope			tear-prod-rate = reduced
      spectacle-prescr=myope			tear-prod-rate = normal
      spectacle-prescr=myope			contact-lenses = none
      spectacle-prescr=hypermetrope		astigmatism = no 
      spectacle-prescr=hypermetrope		astigmatism = yes 
      spectacle-prescr=hypermetrope		tear-prod-rate = reduced 

There are other two item-sets as well, but we will limit our focus to these eight. Recall that the Apriori algorithm creates larger item sets by taking the union of smaller item sets that meet certain criteria. What three-item sets would the Apriori algorithm form from the eight two-item sets shown above? At this point, you shouldn't worry about whether the sets have enough support. Rather, you should list all of the three-item sets that the algorithm would form from these eight sets. However, you should make sure to not include any item sets that the algorithm wouldn't even consider.

Of the three-item sets that you generated above, at least one of them has a support of at least 4. List one item set that has enough support, and list two different association rules that can be formed from it.


CS105
CS105 Labs