Please ensure that Python is installed to run this code
Steps to run the code:
-
Download the ZIP file and open the folder in your desired IDE, preferable VS Code.
-
Create a virtual environment using the command
py -3 -m venv .venv
for Windows. (*Make sure you are in the correct working directory which is the folder created at Step 1) -
Activate the virtual environment using the command
.venv\scripts\activate
. (*Make sure you are currently in the correct working directory which is the folder created at Step 1) -
Run the command
pip install -r requirements.txt
to install all the required libraries to run the project. -
Run the main.py file to execute the code.
Results (Based on Table 1 and Table 2 below):
-
Naïve Bayes results in a better accuracy of 85.71% in performing nutrient deficiency diagnosis compared to Decision Tree with an accuracy of 79.59%. This indicates that the Naïve Bayes approach can classify the nutrient in deficient based on the symptoms more accurately.
-
Decision Tree has an average precision slightly higher than Naïve Bayes while Naïve Bayes has an average recall slightly higher than Decision Tree. Decision Tree results in an average f1-score of 0.85 slightly higher than Naïve Bayes of 0.83.
-
Since Naïve Bayes resulted in a better accuracy as accuracy is more significant for the case of nutrient deficiency diagnosis, it has a better overall performance compared to Decision Tree.