This research explores the cause of uncertainty of rainfed and irrigated systems’ crop yield in the Philippines, and compares the impacts of nitrogen, phosphorus, and magnesium fertilizers on crop yield. To analyze these relationships, Spearman’s rank correlation coefficient is used to assess the associations among soil fertility, nutrient status, and crop yield. Our results show that an adequate water supply will enable effective nutrient use. Conversely, rainfed systems exhibit a strong negative relationship with nitrogen (r = –0.562, p < 0.001) and phosphorus (r = –0.565, p < 0.001) use, suggesting water-stress limitations. In contrast, irrigation reveals a high positive correlation with nitrogen application (r = 0.773, p < 0.001) and magnesium application (r = 0.346, p = 0.001), among other nutrients. To examine predictive potential, we applied several machine learning algorithms, including Decision Tree, Random Forest, Support Vector Regression (SVR), and K-Nearest Neighbors (KNN). When comparing model performance, the Random Forest model showed high robustness and consistency across both irrigated and rainfed regions, with only a minor increase in MAE (0.3107 to 0.3607), MSE (0.1790 to 0.2391), and RMSE (0.4230 to 0.4890), and still maintaining a high R² (from 0.8661 to 0.8095). These findings point towards the necessity for specific agriculture practices, with a focus on coordinated application management of water and fertilizers in irrigation fields and water conservation in rainfed fields, to improve rice roductivity and food security.