- Association Learning: Apriori algorithm
Here is a table with
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 all item sets that have enough support. Pick one item set and list two different association rules that can be formed from it. Which one has higher confidence? |