Implementation of Association rule mining using WEKA tool

Practical - 7
Implementation of Association rule mining using WEKA tool.

Download Practical


Association

Association is a data mining function that discovers the probability of the co-occurrence of items in a collection. The relationships between co-occurring items are expressed as association rules.Association rules are often used to analyze sales transactions.


Apriori Algorithm

1. Scan the transaction data base to get the support of S each 1-itemset, compare S with
min_sup, and get a support of 1-itemsets, L1.
2. Use 𝐿௞ିଵ join 𝐿௞ିଵ to generate a set of candidate k-itemsets. And use Apriori property
to prune the unfrequented k-itemsets from this set.
3. Scan the transaction database to get the support S of each candidate k-itemset in the
find set, compare S with min_sup, and get a set of frequent k-itemsets 𝐿.
4. If the candidate set is not null, go to step 2.
5. For each frequent itemset 1, generate all nonempty subsets of 1
6. For every non empty subset s of 1, output the rule “s=>(1-s)” if confidence C of the
rule “s=>(1-s)” (=support s of 1/support S of s)’ min_conf
7. End.

Implementing Apriori Algorithm:

1. Open weka tool and go to tools>artfViewer. In artfViewer, open dataset named supermarket.artf. the dataset will look like the following figure.


2. Now open explorer tab and open a file named supermarket.artf. the Preprocess tab will look like this.




3. Clicking on the "Associate" tab will bring up the interface for the association rule algorithms. The Apriori algorithm which we will use is the default algorithm selected. in order to change the parameters for this run, we click on the text box immediately to the right of the "Choose" button. Note that this box, at any given time, shows the specific commandline arguments that are to be used for the algorithm.


4. Dialog box for changing the parameters is depicted in following figure. You can specify various parameters associated with Apriori. Click on the "More" button to see the synopsis for the different parameters.




5. WEKA allows the resulting rules to be sorted according to different metrics such as confidence, leverage, and lift. In this example, we have selected confidence as the criteria. Furthermore, we have entered 0.7 as the minimum value for confidence.


6. Once the parameters have been set, We now click on start to run the program. This results in a set of rules as depicted in following figure. It shows association rules gebnerated by the algorithm.



Comments


  1. Great post dear. It definitely has increased my knowledge on Python. Please keep sharing similar write ups of yours. You can check this too for Python tutrial as i have recorded this recently on Python. and i'm sure it will be helpful to you.https://www.youtube.com/watch?v=gXb9ZKwx29U

    ReplyDelete

Post a Comment

Popular posts from this blog

Study of DB Miner Tool

Study of WEKA tool

Create calculated member using arithmetic operators and member property of dimension member