Enhancing Agricultural Productivity: Machine Learning-Based Recommendations Using NPK, Soil pH and Climate Data
Md. Sorowar Mahabub Rabby, Mohammad Main Uddin, Emdadul Islam, Md. Saifur Rahman, Muhammed J. A. Patwary
Abstract
Agriculture is the backbone of the South Asian economy; however, farmers are frequently struggling with crop selection and nutrient management, resulting in poor production and resource inefficiencies. With the world’s population growing and food production under pressure, data-driven solutions to maximize agricultural methods are required. This study evaluates seven machine learning models, including Gradient Boosting (XG Boost), LightGBM (LGBM), Random Forest (RF), and Support Vector Classifier (SVC), to predict crop compatibility using soil parameters such as pH, nitrogen (N), phosphorus (P), potassium (K), temperature, humidity, and rainfall. The models have been evaluated on a dataset of 22 crops, and the best-performing models, Gradient Boosting (XG Boost) and LightGBM (LGBM) achieved an accuracy of 99.27%. The findings reveal that tree-based models are more accurate in predicting crop production, making them appropriate for real agricultural applications. Feature scaling and data pre-processing were crucial for increasing model performance. The study also offers a machine learning-based decision support system to assist farmers in making informed crop selection and fertilizer application decisions, thereby increasing output while lowering environmental impact. Future study will involve applying these algorithms to a bigger dataset from any agricultural county to verify their scalability. In addition, we intend to create a mobile application that will provide farmers with real-time crop selection and nutrient management suggestions, assuring a practical and user-friendly solution for modern agriculture. This study adds to the expanding body of information about utilizing machine learning to improve agricultural practices and promote sustainable farming.