Predictive Analysis of Millets Yield using Machine Learning Regression Models
Predictive Analysis of Millets Yield using Machine Learning Regression Models
Leela M,Shruthi M T
TLDR
An end-to-end machine learning system designed to predict millet yield based on key environmental and agronomic factors and deployed as a user-friendly web application using the Flask framework, allowing users to input parameters and receive instant yield predictions.
Abstract
— Accurate prediction of crop yield is a critical challenge in modern agriculture, directly impacting food security, economic planning, and market stability. Millets, as climate-resilient and highly nutritious grains, are gaining prominence, making the analysis of their productivity increasingly important. This paper presents an end-to-end machine learning system designed to predict millet yield (in hectares per acre) based on key environmental and agronomic factors. The system is developed using a dataset containing historical data on various millet crops, including year, average temperature, and average rainfall. A comprehensive exploratory data analysis was first conducted to understand the underlying data distributions. We then implemented a robust preprocessing pipeline using Scikit-learn's ColumnTransformer to handle both categorical (crop type) and numerical features effectively. A comparative study of five different machine learning regression models—Linear Regression, Lasso, Ridge, K-Nearest Neighbors Regressor (KNR), and Decision Tree Regressor—was performed to identify the most accurate model for this specific task. Based on evaluation metrics, particularly the R-squared (R²) score, the K-Nearest Neighbors Regressor was selected as the optimal model. The trained KNR model and the preprocessing pipeline were then serialized using pickle and deployed as a user-friendly web application using the Flask framework, allowing users to input parameters and receive instant yield predictions.
Keywords — Machine Learning, Millet Yield Prediction, Regression Analysis, K-Nearest Neighbors Regressor, Flask, Data Preprocessing, Predictive Modeling.
