CaSR-Net: An Ensemble Model for Optimized Crop Recommendation Using Machine Learning
Abstract
This study presents the development of a robust crop recommendation system utilizing the CaSR-Net model, an ensemble method combining CatBoost, Support Vector Machine (SVM), and Recurrent Neural Network (RNN) classifiers. Leveraging datasets from Karnataka state agriculture and the “Raitamitra” dataset, the system encompasses critical parameters such as soil type, climate conditions, and historical crop yield data. The preprocessing phase includes data cleaning, normalization using StandardScaler, and feature selection to enhance model performance. Exploratory Data Analysis (EDA) was performed using pair plots, histograms, Kernel Density Estimation (KDE) plots, and correlation heatmaps to understand feature distributions and relationships. The CaSR-Net model was trained by individually optimizing CatBoost for handling categorical data, SVM for high-dimensional space classification, and RNN for capturing temporal dependencies. These models’ outputs were combined using a stacking ensemble technique, with a meta-learner enhancing overall prediction accuracy. The model was evaluated using accuracy, precision, recall, and F1-score metrics, achieving an impressive accuracy of 99.3%, precision of 99.2%, recall of 99.4%, and an F1-score of 99.3%, demonstrating the model’s effectiveness in minimizing false positives and false negatives. A confusion matrix provided further insights into the model’s performance, highlighting areas for potential improvement. Hyperparameter tuning using GridSearchCV optimized each individual model and the ensemble meta-learner, ensuring peak performance. The model was then deployed using Flask, offering a user-friendly interface for real-time crop recommendations. This comprehensive approach underscores the CaSR-Net model’s potential to significantly enhance agricultural decision-making by providing accurate, reliable crop recommendations, thereby optimizing crop yield and resource utilization.
