Crop Yield Prediction Using Random Forest Algorithm and Xgboost Machine Learning Model
Agricultural productivity is strongly influenced by environmental and climatic factors, requiring robust analytical approaches to evaluate their combined impact. This study examines the relationship between food production, biodiversity, and weather patterns across temperate heterogeneous agricultural landscapes in Switzerland. The dataset integrates crop yield, farm characteristics (area, altitude, crop category, and crop type), and 11 climate indices sourced from the European Climate Assessment & Dataset (ECA&D). These indices include temperature variations, precipitation levels, humidity, sunshine duration, and seasonal extremes across four major seasonal subcategories. To model these relationships, we applied machine learning techniques, comparing Random Forest and XGBoost algorithms to analyze their predictive performance. To calculate the model accuracy, we use 3 model evaluation metrics, including R², Mean Squared Error (MSE), and Root Mean Squared Error (RMSE). The results shows that Random Forest outperforms XGBoost with slightly higher R² score (0.9589 vs. 0.9568) and lower MSE (908.80 vs. 956.48). These findings highlight the potential of learning methods in predicting agricultural outcomes and assessing climate impact on crop yield.
Authors
- Saiful Saiful (ORCID: https://orcid.org/0000-0002-4133-7086)
- Narendra Bayutama Wibisono
Publication Details
- Journal
- International Journal of Research and Innovation in Social Science
- Published
- 2025-01-01
- DOI
- https://doi.org/10.47772/ijriss.2025.90300155
- Citations
- 4
- Primary Topic
- Smart Agriculture and AI
- Type
- article
- Field-Weighted Citation Impact
- 7.00