Explainable AI for Crop Recommendation, Yield Forecasting and Rainfall Prediction in Smart Agriculture
Abstract
: Climate change and resource shortages threatening global food security; we urgently need to shift toward sustainable, precision farming. While AI and machine learning have done wonders for forecasting rain and crop yields, their opaque, "black-box" nature makes farmers and policymakers hesitant to trust them. To fix this, we propose an Explainable Smart Agriculture Framework that bridges the gap between high-accuracy predictions and clear interpretability. Our system uses an XLNet-based model to capture complex data relationships and the Enhanced Barnacle Mating Optimization (EBMO) algorithm to pinpoint the most important environmental features. We evaluated various models—including SVM, LSTM, GRU, and Transformers—using datasets from NCA, NATMO, and ICRISAT. By integrating SHAP and LIME, our framework clearly explains how variables like soil moisture and sunlight impact the results. Ultimately, this boosts predictive accuracy by 15% over baseline models but also provides actionable, easy-to-understand explanations. This helps build trust in AI to make confident, sustainable agricultural decisions.