TabNet-Based Crop Yield Prediction for Smart Agriculture
摘要
The increasing global population and the escalating demand for food necessitate the development of precise agricultural forecasting methods. This research explores the application of Attentive Interpretable Tabular Learning (TabNet), for predicting crop yields, utilizing a comprehensive dataset that incorporates various environmental and agricultural factors. This study utilized EDA in assessing the quality and structure of the data, identifying key features such as crop type, area cultivated, seasonal variations, rainfall patterns, and fertilizer usage. Data preprocessing techniques, including handling missing values, encoding categorical variables, and feature scaling, were applied to prepare the dataset for modeling. The TabNet is constructed using PyTorch, with a focus on optimizing hyperparameters for improved accuracy. The ability of TabNet to provide information about feature importance helped in selecting the most important features contributing to output. Early stopping was applied to prevent unnecessary iterations and enhance model generalization. The final TabNet model, trained for 80 epochs, achieved an MSE of 95654.98 and an R-squared value of 0.88, demonstrating strong predictive performance. Model performance is measured based on MSE and R-squared, which explain the model’s ability to approximate complex relationships between input features and crop yields. This study established that TabNet outperforms statistical methods in prediction accuracy in relation to crop yield. In this way, this paper contributes to sustainable agriculture by developing a robust crop yield forecasting framework that enhances food security under climate and resource constraints.