2022/2023 Artificial Intelligence Work by Mafalda Aires and Gonçalo Monteiro
You need the following files to run this code: DataFrame.py, id3.py, main.py, Node.py, predict.py, TestFrame.py. The data files should be in the .csv format. All these files should be in the same directory.
To learn the model and print the Decision Tree, you only need to run the following command in your terminal: "python3 main.py train_set.csv" (where "train_set" is the name of your file)
If you want to use the model to make predictions, you need to add a second file(the test file) without the target labels. The command should be as follows: "python3 main.py train_set.csv test_set.csv"w With this command, the decision tree will still appear.