Abstract

This study aimed to develop and compare classification models utilizing Decision Tree and K-Nearest Neighbors (KNN) in the detection of diseases in coffee leaf images. The dataset comprises coffee leaf images categorized into four different disease types, namely Nodisease, Miner, Phoma, and Rust. To facilitate model training and testing, the dataset was divided into training and validation data using a cross-validation approach. Both the Decision Tree and KNN models underwent meticulous parameter tuning. The experimental results reveal that the Decision Tree model achieved an accuracy rate of 98.20% on the validation data, while the KNN model achieved an accuracy rate of 75.01%. Furthermore, the Decision Tree model exhibited an AUC of 0.9879, recall of 0.9820, precision of 0.9835, and an F1-score of 0.9819 on the validation data. Conversely, the KNN model achieved an AUC of 0.9465, recall of 0.7501, precision of 0.7569, and an F1-score of 0.7485. These findings suggest that the Decision Tree model surpasses the KNN model in accurately detecting coffee leaf diseases, as demonstrated by higher accuracy and other evaluation metrics. However, the relevance of the KNN model remains contingent on application requirements and modeling preferences. These outcomes may contribute to the development of automated systems for disease detection in coffee plants, ultimately promoting more sustainable agricultural practices.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call