INSTRUCTION : To run the Project_Main.py (Runs both the algorithm automatically)
Requirements: 3 Datasets provided with the project namely: 1) Market_Basket_Optimisation.txt 2) Random_Test.txt 3) Chess_data.txt
outputs the result into files.
To Run the program :
-
Open Terminal(Mac) or Cmd(Windows).
-
Change your directory to the same directory where the program is stored.
Command: cd /path/to/program
-
Enter The Command:
python Project_Main.py
Note : enter "python3 Project_Main.py" for bluenose.
-
After Running, the Program will read all the 3 datasets one by one and run H-mine and Apriori with arbitrary value of minimum_support given in the file.
-
The ouput file is generated indicating the name of the dataset and the algorithm used. Confirmation of storage is given in the terminal with a prompt.
NOTE: Only 5 files are generated since Apriori algorithm is not triggered for chess.txt.
Instruction: To Run algorithm H_Mine_Algo.py or Apriori_Algo.py Invidually.
NOTE :Python interactive shell is used to run the runHmine() or runApriori().
To Run the module :
-
Open Terminal(Mac) or Cmd(Windows).
-
Change your directory to the same directory where the program is stored.
Command: cd /path/to/program Command: "python" (to enter pyhton interactive shell) NOTE: use "pyhton3" for Bluenose
-
Enter The following Command in python interactive shell:
import Apriori_Algo import H_Mine_Algo
Apriori_Algo() and H_Mine_Algo() takes 3 parameters:
- Input_file_name.txt
- Output_file_name.txt
- Relative support (Valid range 0<x<1)
For example,
Apriori_Algo.runApriori("Random_Test.txt","Random_Test_Out.txt",0.1)
H_Mine_Algo.runHmine("Random_Test.txt","Random_Test_Out.txt",0.1)
-
After Running, the Program will read the input file and run the corresponding algorithm with the given minimum_support.
-
The ouput file is generated with the given name. If completed successfully Program will print a completion message.
Developers:
Mohamed Muzamil H
[email protected]
Aman Jaiswal
[email protected]