IEEE Access (Jan 2024)
An Approach for Crop Prediction in Agriculture: Integrating Genetic Algorithms and Machine Learning
Abstract
Objectives: The agricultural sector in many South Asian countries, including Bangladesh and India, plays a pivotal role in the economy, with a significant portion of the population dependent on it for livelihood. However, farmers often encounter challenges such as unpredictable weather conditions, soil variability, and natural disasters like floods and erosion, leading to substantial crop losses and financial strain. Despite government subsidies, many farmers struggle to sustain their livelihoods, resulting in a decline in interest in agriculture. Our focus lies on predicting the classification of various crops, including rice, jute, maize, and others, based on a combination of soil and weather features. Soil features, including Nitrogen, Phosphorus, Potassium, and pH levels, along with weather variables such as Temperature, Humidity, and Rainfall, are utilized as inputs for the predictive model. Methods: In this study, we address the critical issue of crop prediction by leveraging advanced machine-learning techniques and integrating genetic algorithms into the predictive model. Our proposed approach employs a hybrid methodology, where a Genetic Algorithm is utilized to optimize the hyperparameters of the model, enhancing its performance and robustness. Specifically, we employ a Random Forest classifier, a powerful ensemble learning technique, to classify the class labels associated with 22 different types of crops. Findings: The model’s accuracy is evaluated extensively, demonstrating a remarkable accuracy rate of 99.3%. Additionally, we utilized Local Interpretable Model-agnostic Explaination(LIME) and SHapley Additive exPlanations(SHAP) Explainable AI (XAI) methods to interpret and validate the model’s predictions. Novelty: The study presents a unique method for crop prediction that combines machine learning (ML) with genetic algorithms (GAs). The goal of this integration is to improve crop forecast models’ interpretability and accuracy. Due to the nature of local approximation LIME may yield contradictory answers. On the other hand, for sophisticated models and extensive datasets, SHAP can be computationally costly. By improving feature selection and model parameters, the integration of GAs with ML models overcomes these drawbacks and produces predictions that are more reliable and accurate. The high accuracy achieved by our system underscores its potential to mitigate crop losses and enhance agricultural productivity, thereby contributing to the sustainability and prosperity of the agricultural sector in any country.
Keywords