For all of the following implementations, please make sure you have the input dataset in the same folder from which you are calling the function.
-
KNN.py contains our implementation of Nearest Neighbors. The name of the input file needs to be changed from inside the code. The program can be run with the command "python KNN.py". The program prints out the Accuracy, precision, recall and F value.
-
NaiveBayes.py contains our implementation of Naive Bayes. The name of the input file needs to be changed from inside the code. The program can be run with the command "python NaiveBayes.py". The program prints out the Accuracy, precision, recall and F value.
-
DecisionTrees.py contains our implementation of Decision Tree. The name of the input file needs to be changed from inside the code. The program can be run with the command "python DecisionTrees.py". The program prints out the Accuracy, precision, recall and F value. It can also print out the structure of the learned decision tree and details of each tree node.
-
RandomForests.py contains our implementation of Decision Tree. The name of the input file needs to be changed from inside the code. The program can be run with the command "python RandomForests.py". The program prints out the Accuracy, precision, recall and F value for each round of cross validation as well as their average.
-
Boosting.py contains our implementation of Decision Tree. The name of the input file needs to be changed from inside the code. The program can be run with the command "python Boosting.py". The program prints out the Accuracy, precision, recall and F value for each round of cross validation as well as their average.