Cotton prediction from weather parameters of different city of Pakistan using machine learning technique
Authors: Haider Syed Tahseen , Ge Wenping , Haider Syed Muhammad , Iqbal Farrukh 
Published: September 2022

This study seeks a distinctive and efficient machine learning system for the prediction of Cotton Production using weather parameters and climate change impact on cotton production. Cotton is a crucial harvest for Pakistan referred to as “white gold”. Cotton is taken into account lifeline of Pakistan's economy. Pakistan is the fifth largest cotton producer. Cotton and textile exporters are the rear bone of Pakistan's economy. Being a cotton-based economy Pakistan aims to extend its share in the billion-dollar value-added global textile market. But in the process of cotton growth affected by meteorological conditions, extreme weather can cause cotton production, based on this kind of situation, machine learning technology to deal with meteorological data analysis, realize the accurate prediction of cotton production, on the influence of the main meteorological factors on cotton yield and diseases, the selection suitable for cotton varieties and resist meteorological disaster is of great significance.
The study analyses the impact of weather parameters on the productivity of cotton in Pakistan using the district level disintegrated data of yield, area, and climate variables (temperature, cloud cover, rainfall, and wind) from 2005-to 2020, also uses the Production of cotton from 2005-2020. These Sixteen years moving averages for each month, climate variables are used. The production function approach is used to analyze the relationship between crop yield and weather parameters up and down each month. Cotton has a great dependence on environmental factors during its growth, especially climate change. The occurrence of cotton pests and diseases has always been an important factor affecting total cotton production. Pests and diseases are also caused by environmental factors. Apply a Machine learning algorithm to analyze the pests and diseases of cotton because of environmental factors. Model construction and analysis of meteorological factors the Decision Tree, Random Forest, Linear Regression, and XGB algorithm using ensemble technique were established for cotton yield prediction in Pakistan and the performance of each model was compared. The comparison results show that the prediction results of the prediction model using the optimization algorithm are significantly improved, among which the XGB model using ensemble techniquehas the best performance, and the root mean square error (RMSE), and mean square error (MSE) of the prediction results are 0.07and 0.27 respectively.
The relationship between main meteorological factors and cotton yield was analyzed by XGB algorithm. The results showed that temperature, cloud cover, rainfall, and wind were the most important factors affecting cotton yield in Pakistan from each growth stage of cotton, the boll stage is the most susceptible to meteorological factor, and the bud stage is the second the geographical location, climatic characteristics and meteorological disasters that resulted in cotton production. So, because of these factors indication on time action can increase the production and overcome on the cotton declined production. In the future there are many improvement ways one thing we can do that is daily base weather parameters use for prediction and diseases related to weather elements. Increase of other weather parameters will be more affective in future.