Comparative Analysis and Hyperparameter Optimization of Machine Learning Models for Predicting Soil Fertility
摘要
This study presents a detailed comparative analysis of various ML models—Support Vector Machine (SVM), Random Forest (RF), Naive Bayes, KNN, Decision Tree (DT), and XGBoost—for predicting soil fertility based on critical soil characteristics. Using a comprehensive dataset that includes Nitrogen (N), Phosphorus (P), Potassium (K), temperature, pH, and humidity, the research applies standard preprocessing techniques and evaluates model performance through rigorous cross-validation and validation accuracy metrics. Among the models evaluated, Random Forest demonstrated the highest performance, which was further improved through hyperparameter tuning using GridSearchCV. The study also utilized SHAP values to gain insights into feature importance, revealing key factors such as Nitrogen content, pH level, and Potassium content as most influential in predicting soil fertility. The results highlight the effectiveness of model selection and optimization techniques in achieving high prediction accuracy. This research not only underscores the potential of ML to enhance precision farming practices but also provides valuable data-driven insights for improving agricultural sustainability. The findings contribute significantly to the advancement of precision agriculture by offering actionable strategies for soil management and fertility enhancement, thereby supporting the development of more resilient and sustainable agricultural systems. The study also leveraged SHAP values to gain insights into feature importance, identifying Nitrogen content, pH level, and Potassium content as the most influential factors in predicting soil fertility. These findings underscore the effectiveness of model selection and optimization techniques in achieving high prediction accuracy and highlight the potential of ML to improve precision farming practices. The research offers valuable data-driven insights for enhancing agricultural sustainability, contributing to the advancement of precision agriculture by providing actionable strategies for soil management and fertility enhancement. Future research should focus on expanding datasets to include diverse regions and additional features, exploring advanced ML techniques, and addressing real-world implementation challenges.