Paper deep dive
An Explainable Ensemble Learning Framework for Crop Classification with Optimized Feature Pyramids and Deep Networks
Syed Rayhan Masud, SK Muktadir Hossain, Md. Ridoy Sarkar, Mohammad Sakib Mahmood, Md. Kishor Morol, Rakib Hossain Sajib
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 97%
Last extracted: 3/27/2026, 1:31:40 AM
Summary
This paper introduces an explainable ensemble learning framework for crop classification, integrating feature pyramids, deep networks, self-attention, and residual networks. The model achieves 98.80% accuracy on a dataset of 3,867 instances from the Ethiopian Agricultural Transformation Agency and NASA. It utilizes SMOTE for class balancing and XAI methods like SHAP and permutation importance to provide actionable insights into soil and climatic feature impacts.
Entities (5)
Relation Signals (3)
Final Ensemble â achievedaccuracy â 98.80%
confidence 100% ¡ The suggested 'Final Ensemble' meta-ensemble design outperforms with 98.80% accuracy
SMOTE â appliedto â Dataset
confidence 100% ¡ The Synthetic Minority Over-sampling Technique (SMOTE) was used to fix the class imbalance in the dataset.
SHAP â usedfor â Crop Classification
confidence 95% ¡ Explainable AI methods, such as SHAP and permutation importance, offer actionable insights
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Agriculture is increasingly challenged by climate change, soil degradation, and resource depletion, and hence requires advanced data-driven crop classification and recommendation solutions. This work presents an explainable ensemble learning paradigm that fuses optimized feature pyramids, deep networks, self-attention mechanisms, and residual networks for bolstering crop suitability predictions based on soil characteristics (e.g., pH, nitrogen, potassium) and climatic conditions (e.g., temperature, rainfall). With a dataset comprising 3,867 instances and 29 features from the Ethiopian Agricultural Transformation Agency and NASA, the paradigm leverages preprocessing methods such as label encoding, outlier removal using IQR, normalization through StandardScaler, and SMOTE for balancing classes. A range of machine learning models such as Logistic Regression, K-Nearest Neighbors, Support Vector Machines, Decision Trees, Random Forest, Gradient Boosting, and a new Relative Error Support Vector Machine are compared, with hyperparameter tuning through Grid Search and cross-validation. The suggested "Final Ensemble" meta-ensemble design outperforms with 98.80% accuracy, precision, recall, and F1-score, compared to individual models such as K-Nearest Neighbors (95.56% accuracy). Explainable AI methods, such as SHAP and permutation importance, offer actionable insights, highlighting critical features such as soil pH, nitrogen, and zinc. The paradigm addresses the gap between intricate ML models and actionable agricultural decision-making, fostering sustainability and trust in AI-powered recommendations
Tags
Links
- Source: https://arxiv.org/abs/2603.25070v1
- Canonical: https://arxiv.org/abs/2603.25070v1
Trouble viewing inline? Open PDF directly â
Full Text
33,913 characters extracted from source content.
Expand or collapse full text
An Explainable Ensemble Learning Framework for Crop Classification with Optimized Feature Pyramids and Deep Networks Syed Rayhan Masud 1 , SK Muktadir Hossain 1,2 , Md. Ridoy Sarkar 1 , Mohammad Sakib Mahmood 2 Md. Kishor Morol 2 , Rakib Hossain Sajib 3 1 Department of Computer Science & Engineering, American International University-Bangladesh, Dhaka, Bangladesh 2 EliteLab.AI, Queens,NY, U.S.A 3 Department of Computer Science & Engineering, Begum Rokeya University, Rangpur,Bangladesh Email: 21-45276-2@student.aiub.edu 1 , 21-44989-2@student.aiub.edu 1 , 21-45312-2@student.aiub.edu 1 , sakib.mahmood@elitelab.ai 2 , kishor@elitelab.ai 2 , rakibnsajib@gmail.com 3 AbstractâAgriculture is increasingly challenged by climate change, soil degradation, and resource depletion, and hence requires advanced data-driven crop classification and recommen- dation solutions. This work presents an explainable ensemble learning paradigm that fuses optimized feature pyramids, deep networks, self-attention mechanisms, and residual networks for bolstering crop suitability predictions based on soil character- istics (e.g., pH, nitrogen, potassium) and climatic conditions (e.g., temperature, rainfall). With a dataset comprising 3,867 instances and 29 features from the Ethiopian Agricultural Transformation Agency and NASA, the paradigm leverages preprocessing methods such as label encoding, outlier removal using IQR, normalization through StandardScaler, and SMOTE for balancing classes. A range of machine learning models such as Logistic Regression, K-Nearest Neighbors, Support Vector Machines, Decision Trees, Random Forest, Gradient Boosting, and a new Relative Error Support Vector Machine are com- pared, with hyperparameter tuning through Grid Search and cross-validation. The suggested âFinal Ensembleâ meta-ensemble design outperforms with 98.80% accuracy, precision, recall, and F1-score, compared to individual models such as K-Nearest Neighbors (95.56% accuracy). Explainable AI methods, such as SHAP and permutation importance, offer actionable insights, highlighting critical features such as soil pH, nitrogen, and zinc. The paradigm addresses the gap between intricate ML models and actionable agricultural decision-making, fostering sustainability and trust in AI-powered recommendations Index TermsâCrop Recommendation, Ensemble Learning, Explainable Artificial Intelligence (XAI), Soil and Climate Data Analytics, Machine Learning Optimization I. INTRODUCTION Agriculture remains the backbone of global food security and economic stability, especially in developing nations. It supports billions of livelihoods and feeds a population pro- jected to reach 9.7 billion by 2050, thereby ensuring that global food needs are met and economic stability is en- sured [1]. Tradition-based manual procedures to select a crop are insufficient for identifying subtle interactions among soil properties, weather parameters, and crop requirements. They require sophisticated analytic tools and data-driven answers for such global issues as climate change, water scarcity, and sustainability. Precision agriculture has transformed farming by leveraging advanced technologies to enhance crop yields by 15-20% and reduce input costs by 30-50% [2], [3], with Machine Learning (ML) playing a crucial role in crop selection, yield prediction, and resource optimization through models such as Logistic Regression, K-Nearest Neighbors, Support Vector Machines, Decision Trees, Random Forest, Gradient Boosting, and our novel Relative Error Support Vector Machine. However, the âblack boxâ nature of most ML modelswhere predictions lack transparent rationale creates significant adoption barriers for farmers, extension agents, and policymakers who require interpretable, actionable insights to make informed decisions and trust AI-driven agricultural recommendations [4]. Explainable Artificial Intelligence (XAI) addresses to miti- gate these problems by providing models with greater trans- parency and interpretability. XAI methods provide systematic ways to unveil the internal logic of intricate models, assign a hierarchy of priority to the modelâs features, and generate human-interpretable explanations for the indicative reasons behind automated decisions. Methods such as SHAP give us values for the contribution of features, whereas permutation feature importance methods provide us values for the im- pact of the features by calculating the deterioration of the model performance [5], [6]. XAI in agriculture helps farmers to understand recommendations, building trust and enabling practical solutions. These revelations improve the adoption of ML-based technologies by bridging the gap between sophis- ticated analytics and real-world farming. Class imbalance in agricultural ML datasets affects predictions by under repre- senting specific crops. The Synthetic Minority Over-sampling Technique (SMOTE) provides an effective solution to this problem. It provides synthetic examples in the minority class feature space, ensuring fair representation across all crop types while avoiding bias toward majority classes [7], [8]. Ensem- ble learning is a revolutionary approach that systematically combines several algorithms by addressing the shortcomings of individual models to produce reliable, high-performing prediction systems. Ensemble approaches reduce individual arXiv:2603.25070v1 [cs.LG] 26 Mar 2026 model mistakes and capture a variety of patterns by merging multiple models. This makes them particularly appropriate for complicated agricultural applications where non-linear and several environmental elements interact [9]. Feature Pyramid Networks achieve hierarchical feature representation through multi-scale pattern recognition, Deep Networks model com- plex non-linear relationships between soil properties and crop suitability, Self-Attention mechanisms provide adaptive feature weighting for dynamic environmental conditions, and Residual Networks facilitate enhanced gradient flow for deep feature learning. The proposed framework introduces a novel architec- ture âFinal Ensembleâ methodology that integrates Feature Pyramid, Deep Network, Self-Attention, and Residual Net- work models in a meta-ensemble. Using performance- and confidence-based weighting, the Final Ensemble achieves su- perior results, reaching 98.80% accuracy, precision, recall, and F1-score, significantly outperforming individual ensemble methods. The major contributions of this work are as follows: 1) High-Performance Meta-Ensemble Framework: We propose a novel design of meta-ensembles which com- bines Feature Pyramid Networks with Deep Networks, Self-Attention mechanisms, and Residual Networks us- ing the performance-based weighted fusion. The Final Ensemble, resulting in an exceptionally good perfor- mance of all martices. 2) Comprehensive XAI Integration: We embedded Ex- plainable Artificial Intelligence (XAI) methods and SHAP and permutation importance to provide trans- parent, multi-level explanations, highlighting the global impact of soil and climate features on crop suitability prediction. 3) Agronomically Validated Insights with Practical Util- ity: Feature importance analysis showed that soil pH, nitrogen, zinc, and other key nutrients are the main factors driving crop classification. These results are con- sistent with agronomic knowledge and convert complex model outputs into practical, data-driven guidance for sustainable crop selection in various environments. These contributions collectively establish a novel explainable ensemble paradigm that not only delivers state-of-the-art per- formance but also ensures transparency and actionable insights for practical agricultural deployment. I. LITERATURE REVIEW Talero-Sarmiento et al. [10] built an ensemble model of k-means clustering and specific Random Forest classifiers to predict suitable places for cocoa cultivation within Colombia. Their two-stage process consists of a location clustering step and a Random Forest classification step using 57658 Colom- bian database and NASA POWER 81 meteorological, soil and elevation variables. The clustered-trained model obtained an accuracy overall of 94.11%, including the performances 94.61%â96.91% scored in cluster-specifics. Umera et al. [2] proposed a smart crop recommendation sys- tem based on ensemble learning using voting method, where Artificial Neural Network (ANN) achieved encouraging results . Their method pitted Logistic Regression, SVM, Decision Tree, KNN, and XGBoost against each other on a Kaggle dataset of 22 types of crops having six features: phosphorous, potassium, nitrogen, humidity, rainfall and pH. The ANN model had the highest performances for all metrics (accuracy, precision, recall, and F 1 -score) of 98%, topped by XGBooster with the highest recall performance. Cherukuri et al. [3] proposed the E algorithm (Ensembled Enabled Edge computing model) to provide precision crop recommendation, through a two-stage evaluation procedure for evaluating crop growth conditions and suitable month of sowing. The method used an ensemble method with majority voting with a Na Ě Äąve Bayes and SVM classifier with 5,315 Kaggle records of nitrogen, phosphorus, potassium, tempera- ture, humidity, pH, and rainfall which are listed as variables for rice, maize and chickpea. The E method reached the highest accuracy of 95% and performed strongly for all metrics (93.99-94.31%). Hosain et al. proposed a hybrid self-attentive transformer- based RNN for financial sentence analysis, improving per- formance and explainability, with insights applicable to agri- cultural decision-making [11]. Ahmed et al. introduced a dementia prediction model using logistic regression, recursive feature elimination, and explainable AI, emphasizing the need for interpretability in agricultural AI models [12]. Raju et al. [13] presented CropCast with an IML-ASE model for crop prediction employing the Agro-Ecological zone data. They have three layer stacking approach using base learners (SVM, Decision Tree, Random Forest, XGBoost, AdaBoost, Naive Bayes, ), meta learners, and fine learners with weight coefficients to increase the precision. The study employed datasets with nitrogen, phosphorous, potassium, moisture, temperature, pH, and rainfall content and compared against Deep Neural Network, Boruta, and other traditional ML and Ensemble Learning methodologies. The IML-ASE model was able to present 97.1% accuracy, 97.09% F1-score, 97.03% precision, 97.12% recall, 100% of specificity with low error rates (MAE (Mean Absolute Error) = 0.23% and RMSE (Root Mean Square Error) = 1.65%). It utilizes Agro- Ecological zone status to make highly precise crop predictions. Singh et al. [14] constructed the Transformative Crop Rec- ommendation Model (TCRM) that combined the tree-based models (random forests, extra trees) with deep learning layers . The system is built on around 3000 samples collected from the FAO, USDA NASS, World Bank, NASA Earth Data, CIAT, GODAN, and Kaggle and has online provenance for eight features including soil nitrogen, soil phosphorous, soil potassium, temperature, humidity, pH, and rainfall. When compared to Logistic regression, K nearest neighbor (KNN) and AdaBoost, TCRM obtained the accuracy of 94.00%, precision of 94.46%, recall of 94.00%, and F1-score of 93.97% with cross-validation score of 97.67%. Kandula et al. designed a Closed Domain Expert System for selecting crops in precision agriculture. The research compares seven ML classifiers like Logistic Regression, Ridge Regression, Decision Trees, Random Forests, KNN, Naive Bayes, and SVM through experiments on soil and climate data. The combination model of K-Nearest Neighbors and Naive Bayes was the best performed model (96.3% accuracy), surpassed other individual models (Decision Tree, 95.4%; Random Forest, 93.5%). Shams et al. [15] introduced an algorithm XAI-CROP that uses explainable artificial intelligence concepts to improve on conventional Crop Recommendation Systems (CRS) . XAI- CROP was tested against models including gradient boosting, decision trees, random forests, Gaussian Na Ě Äąve Bayes, and Multimodal Na Ě Äąve Bayes. It was based on a decision tree classifier and used LIME for interpretability. Data on location, crop, season, area, and productivity were taken from a Kaggle- based crop yield dataset. The XAI-CROP model performed admirably with a Mean Squared Error of 0.9412, Mean Ab- solute Error of 0.9874, and R2 of 0.94152. Srinivasu et al. [16] presented a precision agriculture- specific XAI-driven crop recommendation model that com- bines Spider Monkey Optimization (SMO) with a Radial Basis Function (RBF) neural network to improve learning accuracy and convergence speed . The used process was based on SHAP for explainability and ANOVA-F test for feature selection of a 2300-samples dataset of environmental and soil characteristics. The best performing RBF+SMO model obtained 98.2% accuracy which is way better than baseline models with an improvement of 10-11% in precision, recall and F1-score. I. METHODOLOGY This study proposes a novel methodology for crop recom- mendation by integrating soil properties, weather prediction, and advanced machine learning techniques. A. Dataset Description Table I shows the dataset contains 3,867 records with 29 features, including soil properties (e.g., pH, nitrogen, potas- sium) and weather variables (e.g., temperature, precipitation). The target variable is crop type, with data sourced from the Ethiopian ATA and NASA weather records for crop suitability prediction [17]. TABLE I: Summary of Dataset Sources and Characteristics Ref.Dataset NameFeaturesSource [17]Ethiopian ATA Soil and Crop Dataset 29(soil+ weather) Dataset Link B. Preprocessing Some pre-processing was done to improve the quality of the training set and get it ready for machine learning before the model was trained. The preprocessing steps include: ⢠Label Encoding: Categorical features including the color of the soil and the kind of crop were used a LabelEncoder to transform into numeric values. ⢠Finding Outliers: Using the Interquartile Range (IQR), we found and removed outliers in numerical data like pH, potassium, and nitrogen content to maintain the dataset whole. ⢠Normalization: Using StandardScaler to scale all charac- teristics to the same scale is very crucial for models like SVM and Neural Networks. This is because it makes sure that numerical features like temperature and precipitation are on the same scale. ⢠SMOTE: The Synthetic Minority Over-sampling Tech- nique (SMOTE) was used to fix the class imbalance in the dataset. This method made it possible to make fake examples of crop classes that donât get enough attention, which helped the model learn from a more or less balanced data set. Additionally, soil color categories were standardized to ac- count for variations in naming conventions, and crops with insufficient samples were filtered out to enhance model per- formance. The final dataset after preprocessing contained 2963 samples with balanced classes. C. Models The dataset was trained using a variety of machine learning models to evaluate performance across different algorithmic approaches. Each model was selected to explore different aspects of classification, ranging from linear to non-linear decision boundaries, as well as ensemble methods to assess the robustness and accuracy of the predictions. 1) Logistic Regression: Logistic Regression (LR) models class posteriors via a softmax over linear scores [18]. For input x, the probability of class k is P(y = k | x) = exp(β ⤠k x) P K j=1 exp(β ⤠j x) .(1) AsshowninEq.1,predictionismadeusing arg max k P(y = k | x). Parameters are learned by minimizing cross-entropy, typically with â 2 regularization. LR is simple, interpretable, and computationally efficient. 2) K-Nearest Neighbour: The K-Nearest Neighbors (KNN) algorithm [19] is a simple non-parametric method that clas- sifies a sample by the majority label among its k nearest neighbors. Given data (x i ,y i ) N i=1 , the predicted class is Ëy = arg max c k X i=1 I(y i = c),(2) where I is the indicator function. As shown in Eq. 2, per- formance depends on the choice of k and the distance metric (e.g., Euclidean or Manhattan). 3) Support Vector Machine: Support Vector Machine (SVM) [20] seeks the hyperplane that maximizes the mar- gin between classes, making it effective in high-dimensional feature spaces. For non-linear data, kernel functions project samples into higher dimensions to enable linear separation. Multi-class problems are handled using one-vs-one or one-vs- all schemes. 4) Decision Tree: Decision Tree (DT) [21] is a tree-like model used for classification and regression tasks. It works by splitting the data into subsets based on feature values. At each node, a decision is made based on the feature that best separates the data according to a certain criterion, such as the Gini index or entropy. Decision Trees are easy to understand and interpret, but they are prone to overfitting if not properly pruned. 5) Random Forest: Random Forest (RF) [22] is an ensem- ble learning method that constructs multiple decision trees during training and outputs the class that is the majority vote of the individual trees. This approach helps reduce overfitting and improves the generalization performance compared to a single decision tree. RF is particularly useful for handling large datasets with high-dimensional feature spaces and capturing complex interactions between features. 6) Extreme Gradient Boosting: Extreme Gradient Boosting (XGB) is a fast and distributed gradient boosting. It constructs an aggregation of weak learners (usually decision trees) in an iterative fashion, where each tree attempts to fix the mistakes of its predecessors. XGB has been demonstrated to be effective across many machine learning applications because of its suitability to handle missing values and avoid overfitting as well as its optimization via regularization. 7) SMOTE and Data Balancing: Synthetic Minority Over- sampling Technique (SMOTE) addresses the data imbalance problem by interpolating new samples in minority classes in feature space. In our work, SMOTE was used to balance the classes to avoid the majority classes impairment and to improve training. D. Optimization The grid search method was used to optimize the models by exhaustive searching through a manually defined grid of hyperparameters to identify the optimality in hyperparameters of each model. Hyper parameters like the number of trees in the Random Forest, the type of Kernel in SVM and learning rate in the Neural Network were optimized in order to improve the performance of the models. Also, cross-validation was employed so that the models would fit to unseen data. E. Explainability In order to guarantee the explainability and interpretability of the model, SHAP and Permutation Importance were applied to examine how individual features have drawn model predictions. SHAP values allow one to infer how each feature contributes to the output of the model and, therefore, which feature (e.g., soil pH or temperature) is the most valuable in predicting crop suitability. Permutation importance was also estimated and proved the relevance of several specific features. The explainability methods in the study will allow the accuracy of the model to be understood and interpreted by the farmers and the agricultural experts so that the study provides meaningful representation and interpretation of the data in performing suitable predictions. IV. RESULTS The findings of this study have demonstrated the precision attained by multiple machine learning frameworks used in the cropping classification and the feature relevance analysis methods, performance evaluation Accuracy, Precision, Recall, F1-Score and confusion matrix interactions. The models are tested on crop-based dataset with soil properties, weather conditions being the features, and the study findings say about what the different algorithms are capable of predicting with the crops accurately. Besides the robustness of the model training performance shows in the figure 4. A. Comprehensive Model Comparison Without fine-tuning, the best baseline model achieved, performance accuracy of nearly 80% with the preprocessed dataset. After Fine tuning in table I summarizes the perfor- mance metrics of several machine learning models that were evaluated in our study, including K-Nearest Neighbors (KNN), Neural Networks (N), Gradient Boosting (GB), Extra Trees (ET), Random Forest (RF), Decision Trees (DT), Support Vec- tor Machine (SVM), and other models. Among the different models, K-Nearest Neighbors have the best score of 0.9556 and an F1-Score of 0.9547. This indicates the capability of KNN for balanced precision and recall. Performance metrics of the best model, our proposed Ensemble, are provided in Table I. We can see that our proposed Ensemble achieves the highest accuracy of 0.9880 and also achieves the best F1- Score of 0.9880. The strong model moreover addresses both balance precision and recall, as well as handling overfitting. ModelAccuracyPrecisionRecallF1-Score Final Ensemble0.98800.98800.98800.9880 K-Nearest Neighbors0.95560.95760.95560.9547 Neural Network0.93610.93580.93610.9350 Gradient Boosting0.93330.93420.93330.9327 Extra Trees0.85280.85940.85280.8499 Random Forest0.77780.77820.77780.7754 Decision Tree0.47500.50410.47500.4709 SVM0.47780.48260.47780.4631 Logistic Regression0.38610.36530.38610.3628 Naive Bayes0.29440.29230.29440.2526 AdaBoost0.25560.24960.25560.2496 TABLE I: Model performance comparison based on Accu- racy, Precision, Recall, and F1-Score. ModelAccuracyPrecisionRecallF1-Score Feature Pyramid0.96830.96830.96830.9683 Deep Network0.96620.96620.96620.9662 Self-Attention0.86570.86570.86570.8657 Residual Network0.66380.66380.66380.6638 Final Ensemble0.98800.98800.98800.9880 TABLE I: Final Ensemble model performance comparison based on Accuracy, Precision, Recall, and F1-Score. The Neural Network (N) achieved an accuracy, precision, and F1-score as 0.9361, 0.9358, and 0.9350, respectively, slightly worse than KNN, but impressive. Gradient Boosting also performed well, but had been inferior to KNN, with an accuracy of 0.9333, and an F1-score of 0.9327. On the other side of the performance spectrum, for Logistic Regression (LR), Naive Bayes, and AdaBoost, the perfor- mances were performed poorly, and the LR had only 0.3861 accuracy, and its F1-score was 0.3628. The inferior accuracy of these models may be due to their simplicity and their lack of ability to model the complex patterns in the datase. Best Model: According to this assessment, the proposed ensemble model was decided on as the crop classification model with the highest accuracy and F1-score out of all the tested methods, as shown in Table I. However, Table I shows that KNN performs the best among the base models. B. Confusion Matrix Analysis The confusion matrix (Fig. 1) reflects that the proposed embedded model works for each crop class. Confusion ma- trix with percentages (Fig. 1) suggests the modelâs ability to perfectly classify various crops such as Bean, Dagussa, Niger seed, Pea, Sorghum, and Teff, with an accuracy of 100%. Barley was categorized with 99.2% accuracy, with only one instance misclassified, whereas Wheat obtained 97.8% accuracy, with two samples inaccurately predicted. Overall, the findings indicate the model remains capable of recognizing the difference between most crop classes rather well, with only a few mistakes. This high level of accuracy, especially when it comes to recognising apart crops that look similar, suggests the proposed method is reliable for classifying crops. Fig. 1: Confusion Matrix with Percentages. C. Permutation importance analysis Permutation importance analysis (Fig. 2) was used to identify the most influential features in crop classification. The results show that soil nutrients such as pH, Nitrogen (N), Sulfur (S), Zinc (Zn), and Phosphorus (P) are the top contributors, while soil color and NPK balance also play a role. Environmental variables like wind speed and precipitation showed lower importance. These findings confirm that the model relies primarily on soil properties, consistent with agronomic knowledge, and enhance the interpretability of its predictions. Fig. 2: Feature Occlusion Analysis of the TOP 15 D. Comprehensive Training Performance Dashboard The comprehensive training performance dashboard (Fig. 3) shows the convergence of our embedded model. The training and validation accuracy curves show continual progress over epochs, and for the ensembles, there is increased stability, and the accuracy is improved over individual models. Loss evolu- tion indicates stable convergence, as validation loss decreases together with training loss without significant fluctuations, which suggests the absence of overfitting. Fig. 3: Comprehensive Training Performance Dashboard Individual model performance highlights the gap between architectures: self-attention and residual networks performed less effectively, while feature pyramid and deep networks achieved strong validation accuracies (0.964 and 0.971, respec- tively). The ensemble further improved these results, reaching 0.988 accuracy and reducing error beyond the best individual model. The meta-learner training curves show in figure 3 the ensem- ble frameworkâs effectiveness, with validation accuracy match- ing training accuracy. The loss steadily declines, indicating efficient optimization. Overall, the final ensemble outperforms its base learners in both accuracy and generalization. E. Explainability and Reliability Analyses To enhance the interpretability of the proposed ensemble framework, both feature-based explainability and reliability analyses were performed. Permutation importance analysis was applied to the best-performing base model (Feature Pyra- mid Network), quantifying the contribution of each feature by measuring the drop in accuracy when the feature values were permuted. This analysis revealed that soil-related attributes such as pH, Nitrogen (N), and Zinc (Zn) had the highest influence on crop classification, consistent with agronomic expectations. The Top-15 most essential features are shown in Fig. 2, highlighting the critical role of soil nutrients and environmental properties in accurate predictions. In addition to feature importance, model calibration and reliability were evaluated using ensemble predictions. The prediction confidence distribution (Fig. 4) indicates that most predictions were made with high certainty, with a mean confidence score of 0.79. The entropy distribution further confirms that predictions were associated with relatively low- to-moderate uncertainty, with a mean entropy of 0.67. Notably, the confidence versus correctness analysis demonstrated a positive correlation between prediction confidence and accu- racy, indicating that higher confidence levels align with more accurate predictions. Fig. 4: Comprehensive Training Performance Dashboard The findings confirm the strength of the proposed Ensemble model while providing light on the elements influencing its decisions, guaranteeing that the system remains both precise and reliable for real-world agricultural use. V. CONCLUSION The centerpiece of this study is the development of an explainable ensemble learning model that revolutionizes crop classification via the integration of optimized feature pyramids, deep neural networks, and advanced artificial intelligence techniques. By bringing together key results like the outstand- ing accuracy of 98.80% realized with the Final Ensemble and the instrumental roles played by soil pH, nitrogen, and zinc, as uncovered using SHAP and permutation importance analysis this research offers a holistic approach to enhancing decision-making in agriculture. The relevance of this topic extends beyond technological innovation, as it addresses global food security concerns amidst climate change and resource constraints that jeopardize the sustainability of agricultural systems. Ultimately, this framework exists not only to bridge the gap between complex machine learning models and tan- gible agricultural intelligence but also to set the stage for a future where AI-enabled approaches empower farmers world- wide, fostering resilience and prosperity in an ever-changing environment. REFERENCES [1] A. Ranjithkumar, âAssessing the impact of agricultural land reduction on future global food security: Challenges and sustainable solutions,â Indian Journal of Natural Sciences, vol. 15, p. 89 066â83, 2025. [2] M. Padhiary, D. Saha, R. Kumar, L. N. Sethi, and A. Kumar, âEnhancing precision agriculture: A comprehensive review of machine learning and ai vision applications in all-terrain vehicle for farm automation,â Smart Agricultural Technology, vol. 8, p. 100483, 2024. [3] Y. Xing and X. Wang, âPrecise application of water and fertilizer to crops: challenges and opportunities,â Frontiers in Plant Science, vol. 15, p. 1444560, 2024. [4] M. T. Hosain, J. R. Jim, M. Mridha, and M. M. Kabir, âExplainable ai approaches in deep learning: Advancements, applications and chal- lenges,â Computers and electrical engineering, vol. 117, p. 109246, 2024. [5] R. K. Makumbura, L. Mampitiya, N. Rathnayake, D. Meddage, S. Henna, T. L. Dang, Y. Hoshino, and U. Rathnayake, âAdvancing water quality assessment and prediction using machine learning models, coupled with explainable artificial intelligence (xai) techniques like shapley additive explanations (shap) for interpreting the black-box nature,â Results in Engineering, vol. 23, p. 102831, 2024. [6] M. Venkatanaresh and I. Kullayamma, âA hybrid cost-sensitive and fea- ture reweighting approach for improved crop recommendation systems,â in 2024 International Conference on Innovative Computing, Intelligent Communication and Smart Electrical Systems (ICSES).IEEE, 2024, p. 1â8. [7] S. Matharaarachchi, M. Domaratzki, and S. Muthukumarana, âEnhanc- ing smote for imbalanced data with abnormal minority instances,â Machine Learning with Applications, vol. 18, p. 100597, 2024. [8] A. Imtiaz, S. Hossain, R. Rihan, and D. Gomes, Innovative Approaches to Tomato Leaf Disease Detection Bridging Tradition and Technology, 05 2025, p. 123â148. [9] X. Dong, Z. Yu, W. Cao, Y. Shi, and Q. Ma, âA survey on ensemble learning,â Frontiers of Computer Science, vol. 14, no. 2, p. 241â258, 2020. [10] L.Talero-Sarmiento,S.Roa-Prada,L.Caicedo-Chacon,and O. Gavanzo-Cardenas, âA data-driven approach to improve cocoa crop establishment in colombia: insights and agricultural practice recommendations from an ensemble machine learning model,â AgriEngineering, vol. 7, no. 1, p. 6, 2024. [11] M. Hosain, M. Morol, and M. Hossen, âA hybrid self attentive linearized phrase structured transformer based rnn for financial sentence analysis with sentence level explainability,â Scientific Reports, vol. 15, p. 23893, 2025. [12] R. Ahmed, N. Fahad, M. S. U. Miah, M. J. Hossen, M. K. Morol, M. Mahmud, and M. M. Rahman, âA novel integrated logistic regression model enhanced with recursive feature elimination and explainable artificial intelligence for dementia prediction,â Healthcare Analytics, vol. 6, p. 100362, 2024. [13] C. Raju, D. Ashoka, and A. P. BV, âCropcast: Harvesting the future with interfused machine learning and advanced stacking ensemble for precise crop prediction,â Kuwait Journal of Science, vol. 51, no. 1, p. 100160, 2024. [14] G. Singh and S. Sharma, âEnhancing precision agriculture through cloud based transformative crop recommendation model,â Scientific Reports, vol. 15, no. 1, p. 9138, 2025. [15] M. Y. Shams, S. A. Gamel, and F. M. Talaat, âEnhancing crop rec- ommendation systems with explainable artificial intelligence: a study on agricultural decision-making,â Neural Computing and Applications, vol. 36, no. 11, p. 5695â5714, 2024. [16] P. Naga Srinivasu, M. F. Ijaz, and M. Wo Ě zniak, âXai-driven model for crop recommender system for use in precision agriculture,â Computa- tional Intelligence, vol. 40, no. 1, p. e12629, 2024. [17] S. Alemu, âCrop recommendation using soil properties and weather prediction dataset,â 2024. [Online]. Available: https://doi.org/10.17632/ 8v757r4st.1 [18] M. A. H. Reaj, M. R. Abir, M. A. Rahman et al., âxfe-bert: The way to the interpretable financial text analysis,â Research Square, Nov. 2025, preprint, Version 1. [Online]. Available: https: //doi.org/10.21203/rs.3.rs-7786713/v1 [19] B. M. T. Haque and M. A. Rahman, âErp modernization outcomes in cloud migration: A meta-analysis of performance and total cost of ownership (tco) across enterprise implementations,â International Journal of Scientific Interdisciplinary Research, vol. 2, no. 2, p. 168â203, 2021. [Online]. Available: https://doi.org/10.63125/vrz8hw42 [20] B. M. Taslimul, T. A. I. Foysal, M. I. Hossan, A. A. Noman, M. A. Rahman, A. Ahmed, and M. J. Hossen, âThe role of ai and automation in it risk governance and enterprise systems,â International Journal of Applied Mathematics, vol. 39, no. 1s, p. 151â163, Jan. 2026. [Online]. Available: https://doi.org/10.12732/ijam.v39i1s.1617 [21] B. M. Taslimul, M. I. Hossan, A. A. Noman, M. A. Rahman, A. Ahmed, D. Rahman, G. M. Mohiuddin, and T. H. Liew, âEnterprise risk man- agement in erp implementation: Challenges, strategies and recent trends in ai â a mini review,â International Journal of Applied Mathematics, vol. 39, no. 1s, 2026. [22] M. J. Hasan, S. H. Shifat, J. Matubber, R. Hossain, M. A. Rahman, B. M. T. Haque, and M. J. Hossen, âAn in-depth exploration of machine learning methods for mental health state detection: A systematic review and analysis,â Frontiers in Digital Health, vol. 7, 2026. [Online]. Available: https://doi.org/10.3389/fdgth.2025.1724348