Machine Learning-Based Prediction of Moroccan Crop Yields with Drip Irrigation
摘要
In Morocco, agriculture remains a key driver of the national economy, yet it is increasingly threatened by climatic challenges such as limited rainfall, high temperatures, and worsening water scarcity. Drip irrigation has emerged as a promising solution to improve water use efficiency, but its impact on crop yield has not been thoroughly assessed through the lens of machine learning (ML). The objective of this study is to address this gap by applying various ML algorithms to predict agri-food crop yields, integrating environmental and irrigation data. The collected dataset combines climatic factors (such as temperature, humidity, soil water content, and rainfall) with yield records, especially under drip irrigation conditions. Different ML models, including linear regression (LR), decision trees (DT), random forest (RF), support vector machines (SVM), artificial neural networks (ANN), and K-nearest neighbors (KNN), were tested. Performance was evaluated using standard metrics such as R2, RMSE, accuracy, precision, recall, and F1 score. Among the models, RF was found to be the most reliable, providing an R2 of 0.85 and a low RMSE of 150 kg/ha, while ANN also performed well although with higher computational requirements.