Rice is one of the six priority crops chosen by the government of Rwanda to increase agricultural productivity. This crop faces significant challenges from climate variability and soil conditions, affecting yields and food security. The past studies concentrated on building machine learning regression models for predicting the rice productivity with the help of weather parameters as predictors. Few researchers incorporated some soil nutrients to improve the precision of the prediction model. However, most of the farmers in Rwanda rely on agricultural input like inorganic fertilizer to boost the agriculture productivity. This means that the weather parameters are not sufficient to build a robust crop yield prediction model without incorporating the soil parameters. In this paper, rice yield status (favorable, unfavorable) prediction model was optimized using machine learning techniques, including logistic regression, random forest, gradient boosting, extreme gradient boosting, support vector machine, and artificial neural networks. The models were trained on historical weather parameters and soil nutrient data collected from the National Institute of Statistics of Rwanda, Rwanda Agriculture and Animal Resources Development Board and Rwanda Meteorology Agency. Findings indicated that the eXtreme Gradient Boosting (XGBOOST) model outperformed other models under consideration with 91%, 94.1%, and 82.7% of prediction accuracy, sensitivity, and precision, respectively. The above results demonstrate that the XGBOOST is the most robust model in predicting rice yield. The feature importance technique applied in this study also revealed that weather parameters (rainfall, and temperature), phosphorus, sulfur, manganese and carbon were crucial factors to prioritize for rice yield prediction compared to other model predictors under study. The results may provide valuable insights into whether the rice yield will be classified as low or high. This information is essential for helping farmers and decision-makers obtain actionable insights into expected crop yields, enabling them to make informed decisions on agricultural inputs resource allocation to maximize Rwanda's agricultural productivity.
Key words: artificial intelligence, machine learning, precision farming, Smart agriculture, yield prediction