Python Assignment with two-items association rule (due in 5 hrs)

profilealva6506
assingment.docx

Develop a program in Python that will compute all the two-items associations rules in the form A ---> B, based on a given threshold computation method and value by the user for a given market data.

Program will produce the following menu for the user to choose:

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

Once the user chooses the threshold computation method, then user will be asked to set a threshold value to display the association rules between the pairs greater than the threshold as shown below.

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

Threshold: 0.30 <------ User enters the value.

Then your program will output the Association rules as shown below.

Association rules:

banana ---> apple, 0.30

napkin ---> apple, 0.45

bread ---> gum, 0.60