Question: Input: Market basket data given in a formatted text file, market.data . Output: All associations rules in the form A ---> B, based on a

Input: Market basket data given in a formatted text file, market.data.

Output: All associations rules in the form A ---> B, based on a given threshold computation method and value by the user.

Develop a program that will compute the association rules for a given market basket data.

Your program will read in the data from the text file whose format is given below:

market.data

7 // # of transactions

1, 3, apple, gum, juice //transaction id, # of items in the transaction, item1, item2,

2, 2, banana, napkin

3, 4, napkin, apple, juice, bread

4, 1, bread

5, 3, utensil, toot brush, toot paste

6, 2, apple, bread

7, 5, banana, bread, gum, toot paste, juice

Program will print the following:

MENU

THIS PROGRAM WILL COMPUTE ALL THE RULES in the form A ---> B.

Please chose the threshold computation method:

Enter 1 for #(A, B) / #A

Enter 2 for (#(A, B) / #A)/#transactions

Enter E to exit

You have chosen the . method to compute the threshold value for the rules.

Please now enter the threshold value for the rules you want to see. Enter E to exit:

Threshold: 0.30

Association rules:

banana ---> apple, 0.30

napkin ---> apple, 0.45

bread ---> gum, 0.60

After that, the entire menu screen will come up again.

You are free to choose the language you want to use. However, you should be able to demonstrate the code and its compilation and running processes if asked in class. YOU ARE NOT ALLOWED TO MODIFY THE DATA FILE NOR THE OUTPUT FORMAT!!!!!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!