XAI-Enhanced Machine Learning Model for Fertilizer Recommendation System
摘要
The work proposed an improved explainable (XAI) artificial intelligence tree-based machine learning model that optimizes fertilizer recommendations to maximize agricultural production. The interquartile range (IQR) was used to detect outliers, which were then handled using group mean replacement. Furthermore, the synthetic minority oversampling technique (SMOTE) was used to address the imbalance class. GridSearchCV was used to improve each model’s hyperparameters across all datasets. Finally, the overall best performance model was determined, and SHapley Additive Explanations (SHAP) were used to explain the model prediction. The experimental analysis has shown that the random forest (RF) classifier attained the most promising result when considering their default parameters. Overall, the extreme gradient boosting (XGBoost) classifier outperformed the other models across the datasets against all the metrics considered after tuning their corresponding hyperparameters, achieving accuracy (Test = 1.00, ACV = 1.00), precision (Test = 1.00, ACV = 1.00), recall (Test = 1.00, ACV = 1.00), and F1-score (Test = 1.00, ACV = 0.95) on dataset2. Similarly, the perfect classification rate was attained by DT on dataset3 for all the metrics considered. According to the SHAP analysis, nitrogen, phosphorus, and potassium are the most influential characteristics for the class 20–20, as witnessed by the experimental results.