This research presents a comprehensive crop recommendation system that combines linear and nonlinear machine learning models to forecast suitable crops based on soil and environmental factors. The study evaluates the performance of Logistic Regression (linear) alongside Random Forest, Gradient Boosting, and XGBoost (nonlinear models) in delivering accurate crop suggestions. Precision, recall, and F1-score metrics are employed to assess the models' effectiveness. The dataset incorporates vital soil characteristics, such as nitrogen, phosphorus, and potassium levels, and environmental parameters like temperature, humidity, pH, and rainfall. The results demonstrate that while linear models like Logistic Regression offer simplicity, nonlinear models such as XGBoost excel in capturing complex data patterns, providing more precise recommendations. This dual-model strategy empowers farmers to make informed decisions tailored to specific farming conditions, boosting agricultural productivity. The study underscores the importance of integrating both linear and nonlinear machine learning techniques to achieve optimal crop recommendations, encouraging resource efficiency and sustainable agricultural practices.
Read full abstract