A Hybrid Approach for Crop Yield Prediction using Machine Learning Algorithms
DOI:
https://doi.org/10.31357/ijss.v1i02.8274Keywords:
Crop Prediction, Hybrid Approach, K-Nearest Neighbors (KNN), Random Forest (RF), Artificial Neural Networks (ANN)Abstract
Sri Lanka’s agricultural sector is the backbone of the country’s economy, and it is essential to increase agricultural productivity to ensure food security. This research has demonstrated the potential of a hybrid approach that combines Machine Learning (ML) Algorithms to improve crop yield prediction and advance food security in Sri Lanka. Drawing on the literature review findings, this finding proposes a novel hybrid approach that integrates multiple ML algorithms to improve crop yield prediction. The hybrid model leverages key factors such as Humidity, Profile Soil Moisture, and yield for selected 11 districts representing the different climatic zones in Sri Lanka. Crops such as tea, paddy, rubber, and coconut significantly impact the national gross domestic product GDP in Sri Lanka. The performance of various ML algorithms, including Random Forest (RF), K-Nearest Neighbors (KNN), and Artificial Neural Networks (ANN), was evaluated separately to determine their ability to accurately predict crop yields and then hybrid models developed by combining KNN and RF, ANN and KNN, ANN and RF. As a result of these hybrid models, the highest performance was achieved by a hybrid model of KNN with RF, with an R2 value of 0.9965, Mean Squared Error (MSE) of 0.00002%, and Mean Absolute Error (MAE) of 0.06%. Root Mean Squared Error (RMSE) is 0.14%, To enable real-time predictions, a simple web application is created using Flask, a Python web framework. The trained model is then utilized within this application to make yield predictions.