- Weka - Discussion
- Weka - Useful Resources
- Weka - Quick Guide
- Weka - Feature Selection
- Weka - Association
- Weka - Clustering
- Weka - Classifiers
- Weka - Preprocessing the Data
- Weka - File Formats
- Weka - Loading Data
- Weka - Launching Explorer
- Weka - Installation
- What is Weka?
- Weka - Introduction
- Weka - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Weka - Association
It was observed that people who buy beer also buy diapers at the same time. That is there is an association in buying beer and diapers together. Though this seems not well convincing, this association rule was mined from huge databases of supermarkets. Similarly, an association may be found between peanut butter and bread.
Finding such associations becomes vital for supermarkets as they would stock diapers next to beers so that customers can locate both items easily resulting in an increased sale for the supermarket.
The Apriori algorithm is one such algorithm in ML that finds out the probable associations and creates association rules. WEKA provides the implementation of the Apriori algorithm. You can define the minimum support and an acceptable confidence level while computing these rules. You will apply the Apriori algorithm to the supermarket data provided in the WEKA installation.
Loading Data
In the WEKA explorer, open the Preprocess tab, cpck on the Open file ... button and select supermarket.arff database from the installation folder. After the data is loaded you will see the following screen −
The database contains 4627 instances and 217 attributes. You can easily understand how difficult it would be to detect the association between such a large number of attributes. Fortunately, this task is automated with the help of Apriori algorithm.
Associator
Cpck on the Associate TAB and cpck on the Choose button. Select the Apriori association as shown in the screenshot −
To set the parameters for the Apriori algorithm, cpck on its name, a window will pop up as shown below that allows you to set the parameters −
After you set the parameters, cpck the Start button. After a while you will see the results as shown in the screenshot below −
At the bottom, you will find the detected best rules of associations. This will help the supermarket in stocking their products in appropriate shelves.
Advertisements