Agriculture remains a critical sector for global food security, yet crop productivity is increasingly influenced by volatile climatic conditions and resource constraints. Accurate crop yield prediction plays a vital role in enhancing decisionmaking for farmers, agronomists, and policymakers. This paper presents a machine learning-based approach for crop yield prediction using historical weather patterns, soil data, and crop-specific variables. Leveraging publicly available datasets, various regression models- including Linear Regression, Random Forest Regressor, and XGBoost were implemented and evaluated using Python. Feature engineering was employed to extract meaningful insights from variables such as rainfall, temperature, soil type, fertilizer usage, and crop type. The models were trained and tested to predict yield with respect to specific crops across multiple seasons. Performance metrics such as R2 (R square) score, RMSE, and MAE were used to compare model effectiveness. Among the models evaluated, ensemblebased methods demonstrated superior accuracy and robustness. The proposed system showcases the potential of machine learning techniques to provide actionable insights in agricultural planning and risk management, especially in resource-constrained environments.
Crop Yield Prediction, Machine Learning, Agriculture, Weather Data, Regression Models, Random Forest, XGBoost, Python Implementation, Agricultural Forecasting, Data-Driven Farming