Agriculture plays a vital role in ensuring food security, yet farmers often face difficulties in selecting suitable crops due to varying soil and climatic conditions. This project introduces a cloud-enabled crop recommendation system that leverages machine learning techniques to provide reliable crop suggestions. The system processes key input parameters such as soil nutrients (Nitrogen, Phosphorus, Potassium, and pH) along with environmental factors (temperature, humidity, and rainfall) to determine the most suitable crops for cultivation. Two machine learning models, Random Forest and XGBoost, were developed and evaluated, with Random Forest demonstrating superior performance. To enhance accessibility and scalability, the best-performing model was deployed on Amazon Web Services (AWS), enabling farmers and stakeholders to access recommendations anytime and anywhere. By integrating machine learning with cloud computing, this work highlights the potential of data-driven solutions to support sustainable and efficient agricultural practices.
Introduction
Modern agriculture increasingly relies on data-driven decisions to improve yield, sustainability, and resource efficiency. Crop selection plays a vital role in productivity, but farmers often rely on experience or generic guidelines, which can lead to poor outcomes due to variable soil and climatic conditions. This project addresses the need for a scalable, real-time, and accurate crop recommendation system that integrates key environmental parameters.
? Objectives
Build a cloud-based system that recommends the best crop using data like N, P, K levels, pH, rainfall, and humidity.
Apply machine learning (ML) for accurate crop prediction through feature extraction and classification.
Ensure real-time accessibility and scalability via cloud deployment (AWS EC2).
Promote precision agriculture by replacing guesswork with scientific insights.
Support sustainability and food security through smart farming practices.
???? Literature Insights
ML Algorithms like Random Forest, XGBoost, KNN, SVM, CNN, and ensemble methods have shown promise in crop prediction.
Cloud platforms (e.g., AWS) offer the necessary scalability, real-time inference, and deployment support.
Target: Crop label (best crop based on conditions)
???? Key Limitations
Current model limited to the predefined dataset and crop categories.
External factors like market demand, pest outbreaks, or government policies are not considered.
Future improvements could include temperature trends, soil moisture, and IoT-based real-time monitoring.
???? Impact & Significance
Helps farmers make scientific, real-time decisions for better yields.
Promotes resource efficiency and sustainable agriculture.
Assists policymakers and researchers in designing technology-driven farming strategies.
Lays the foundation for future research into intelligent farming systems.
Conclusion
This study focused on creating and implementing a smart crop recommendation system based on ML, specifically the Random Forest Classifier (RFC) algorithm, and deploying it on the AWS cloud platform. The results showed that the RFC model achieved excellent predictive performance, with a 99.32% total accuracy rate, as well as good F1-score, precision, and recall scores. These findings indicate how well RFC handles agricultural datasets where factors like soil nutrients (Nitrogen, Phosphorus and Potassium), pH, temperature, humidity, and rainfall influence crop suitability.
A key contribution of this work is the successful cloud deployment on AWS, which ensures the model is accurate and also scalable, accessible, and useful for real-world applications. Compared to local machine learning experiments, deploying the system on AWS offers several benefits: it can handle large datasets, provides secure access from remote locations, and reliably delivers real-time recommendations. This makes the system especially valuable for farmers, policymakers, and agricultural extension workers who need timely and accurate insights for making informed decisions.
Furthermore, merging machine learning and cloud computing takes another step towards digital transformation in agriculture. By using cloud services, the proposed system makes advanced technologies available even in rural or resource-limited areas, thereby connecting AI research with its practical benefits for farming.
In summary, the project shows how machine learning-based crop recommendations, backed by cloud infrastructure, can improve agricultural productivity, optimize resource use, and support sustainable farming practices. The RFC model’s excellent performance and also the reliability of AWS deployment highlights how well this method works to address real-world agricultural challenges.
References
[1] Dalavai, Adarsha & Dalli, Manvith & Jogi K, Dhanush & H M, Monisha. (2024). A Web Based Crop Recommendation System Using Various Machine Learning Algorithms.
[2] H. N. Munasinghe, E. G. T. Dasunika, and W.W.L.Subhodani, “A Hybrid Approach for Crop Yield Prediction using Machine Learning Algorithms,” Int. J. Soc. Stat., vol. 1, no. 02, 2024, doi: 10.31357/ijss.v1i02.8274.
[3] B. Muddarla and P. R. Vatti, “Machine Learning in Cloud Environments?: Leveraging SQL and Python for Big Data Analytics,” vol. 7, no. 7, pp. 12–21, 2024.
[4] D. Bayazitov, K. Kozhakhmet, A. Omirali, and R. Zhumaliyeva, “Leveraging Amazon Web Services for Cloud Storage and AI Algorithm Integration: A Comprehensive Analysis,” Appl. Math. Inf. Sci., vol. 18, no. 6, pp. 1235–1246, 2024, doi: 10.18576/amis/180606.
[5] A. Kandi and M. Anurag Reddy Basani, “Real-time Analytics on AWS and Google Cloud to Unlock Data Driven Insights,” Int. J. Sci. Res., vol. 13, no. 11, pp. 302–308, 2024, doi: 10.21275/sr241105211600.
[6] P. Ayesha Barvin and T. Sampradeepraj, “Crop Recommendation Systems Based on Soil and Environmental Factors Using Graph Convolution Neural Network: A Systematic Literature Review †,” Eng. Proc., vol. 58, no. 1, 2023, doi: 10.3390/ecsa-10-16010.
[7] R. Ed-daoudi, A. Alaoui, B. Ettaki, and J. Zerouaoui, “A Predictive Approach to Improving Agricultural Productivity in Morocco through Crop Recommendations,” Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 3, pp. 199–205, 2023, doi: 10.14569/IJACSA.2023.0140322.
[8] M. Hasan et al., “Ensemble machine learning-based recommendation system for effective prediction of suitable agricultural crop cultivation,” Front. Plant Sci., vol. 14, no. August, pp. 1–18, 2023, doi: 10.3389/fpls.2023.1234555.
[9] S. A. Doke, “A Review on AWS - Cloud Computing Technology,” Int. Res. J. Mod. Eng. Technol. Sci., no. 06, pp. 3000–3005, 2023, doi: 10.56726/irjmets42351.
[10] N. N. Thilakarathne, M. S. A. Bakar, P. E. Abas, and H. Yassin, “A Cloud Enabled Crop Recommendation Platform for Machine Learning-Driven Precision Farming,” Sensors, vol. 22, no. 16, 2022, doi: 10.3390/s22166299.
[11] S.ABARNA, & PRIYA, P.GANESH. (2022). CROP YIELD PREDICTION USING DEEP XGBOOST ALGORITHM. International journal of engineering technology and management sciences. 297-304. 10.46647/ijetms.2022.v06i05.043.
[12] D. Gosai, C. Raval, R. Nayak, H. Jayswal, and A. Patel, \"Crop Recommendation System using Machine Learning,\" International Journal of Scientific Research in Computer Science, Engineering and Information Technology, pp. 558–569, Jun. 2021, doi: 10.32628/CSEIT2173129.
[13] T. Singh, “The effect of Amazon Web Services (AWS) onCloud-Computing,” Int. J. Eng. Res. Technol., vol. 10, no. 11, pp. 480–482, 2021.
[14] R. Swarnkar, S. Jain, and M. Kusum, “AWS Security Issues And Good Practices,” An Int. Peer Rev. Journal), www.ijaconline.com, vol. XV, no. June, pp. 1–8, 2021, [Online]. Available: www.ijaconline.com.
[15] Agarwal, Sonal & Tarar, Sandhya. (2021). A HYBRID APPROACH FOR CROP YIELD PREDICTION USING MACHINE LEARNING AND DEEP LEARNING ALGORITHMS. Journal of Physics: Conference Series. 1714. 012012. 10.1088/1742-6596/1714/1/012012.